Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1alpha2 api server implementation #456

Merged
merged 5 commits into from
Apr 19, 2019

Conversation

YujiOshima
Copy link
Contributor

@YujiOshima YujiOshima commented Apr 15, 2019

Signed-off-by: YujiOshima yuji.oshima0x3fd@gmail.com


This change is Reviewable

Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
@YujiOshima
Copy link
Contributor Author

I will add some tests.

if in.AlgorithmName == "" {
return &api_pb.GetSuggestionsReply{Trials: []*api_pb.Trial{}}, errors.New("No algorithm name is specified")
}
conn, err := grpc.Dial("vizier-suggestion-"+in.AlgorithmName+":6789", grpc.WithInsecure())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question: should we still use vizier-* names internally or should we start renaming them to katib? See #136.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think, we should start renaming to katib. i had renamed studyjobcontroller to katib-controller

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree. I will change them.

pkg/db/v1alpha2/interface.go Show resolved Hide resolved
@richardsliu richardsliu mentioned this pull request Apr 16, 2019
15 tasks
string start_time = 2; ///The start of the time range. RFC3339 format
string end_time = 3; ///The end of the time range. RFC3339 format
string filter = 4;
string filter = 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does filter look like? I don't find it is used in GetTrialList()

Copy link
Contributor Author

@YujiOshima YujiOshima Apr 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forgot it. I will add it to GetTrialList.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the filter is used to filter trial name, can we rename it to filter_by_name? Also in db function, please handle filter == "" case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! updated.

if in.AlgorithmName == "" {
return &api_pb.ValidateAlgorithmSettingsReply{}, errors.New("No algorithm name is specified")
}
conn, err := grpc.Dial("vizier-suggestion-"+in.AlgorithmName+":6789", grpc.WithInsecure())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add a function like getSuggestionServiceUrl(name String) string or even a function like getSuggestionServiceConnection(name String)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
@YujiOshima YujiOshima changed the title [WIP] v1alpha2 api server implementation v1alpha2 api server implementation Apr 18, 2019
@YujiOshima
Copy link
Contributor Author

I applied comments and added tests.
PTAL @richardsliu @johnugeorge @hougangliu @gaocegege

@gaocegege
Copy link
Member

cc @anchovYu PTAL, too

Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
@hougangliu
Copy link
Member

/lgtm

return &resp, fmt.Errorf("grpc.health.v1.Health can only be accepted if you specify service name.")
}

// Check if connection to vizier-db is okay since otherwise manager could not serve most of its methods.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update this comment as well (vizier -> katib)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

string start_time = 2; ///The start of the time range. RFC3339 format
string end_time = 3; ///The end of the time range. RFC3339 format
string filter = 4;
string filter_by_name = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually prefer "filter", because semantically it allows us to do things like:

  • filter:name=foo
  • filter:start_time>x
  • filter:end_time<=y

We probably will only support filtering by name for now, but I can see a use case for the others. What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense. A general filter will really help. So we need use d.db.Query("SELECT * FROM trials WHERE experiment_name = ? AND ?, experimentName, filter) instead, not limited in name filed filter. So when update, please comment what filter looks like.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richardsliu @hougangliu Thanks. I revert to filter and add comments.

@@ -29,7 +29,6 @@ echo "Generating v1alpha1 VizierDBInterface..."
mockgen -package mock -destination pkg/mock/v1alpha1/db/db.go github.com/kubeflow/katib/pkg/db/v1alpha1 VizierDBInterface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vizier -> Katib

Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm label Apr 19, 2019
@richardsliu
Copy link
Contributor

/lgtm

@hougangliu
Copy link
Member

/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hougangliu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit b886768 into kubeflow:master Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants