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

Fix NotImplementedError for TPE and Random suggestion. #1130

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

c-bata
Copy link
Member

@c-bata c-bata commented Apr 8, 2020

What this PR does / why we need it:

I deployed katib (rev ab3dab0) to my kubernetes cluster, then applied this experiment which specifies random as an algorithmName attribute.

$ kubectl logs cmaes-example-random-7dd54668f8-ffgvs -n kubeflow
ERROR:grpc._server:Exception calling application: Method not implemented!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/grpc/_server.py", line 434, in _call_behavior
    response_or_iterator = behavior(argument, context)
  File "/usr/src/app/github.com/kubeflow/katib/pkg/apis/manager/v1alpha3/python/api_pb2_grpc.py", line 135, in ValidateAlgorithmSettings
    raise NotImplementedError('Method not implemented!')
NotImplementedError: Method not implemented!

I checked the implementation of hyperopt suggestion service, but it doesn't implement ValidateAlgorithmSetttings. So this method is called.

I tested this patch on my Kubernetes cluster, then this problem is resolved. But I don't know what should I validate in this method, so I just added an empty implementation of ValidateAlgorithmSettings for now.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
None

Special notes for your reviewer:

  1. This problem also happens when using tpe algorithm.
  2. Please tell me if I should put a todo comment.

Release note:

None

I guess this bug was recently added.

@kubeflow-bot
Copy link

This change is Reviewable

@k8s-ci-robot
Copy link

Hi @c-bata. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@c-bata
Copy link
Member Author

c-bata commented Apr 8, 2020

I also checked examples/v1alpha3/tpe-example.yaml.

Before

$ kubectl apply -f ./examples/v1alpha3/tpe-example.yaml
$ kubectl -n kubeflow logs -f tpe-example-tpe-5898d78478-k6kkk
ERROR:grpc._server:Exception calling application: Method not implemented!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/grpc/_server.py", line 434, in _call_behavior
    response_or_iterator = behavior(argument, context)
  File "/usr/src/app/github.com/kubeflow/katib/pkg/apis/manager/v1alpha3/python/api_pb2_grpc.py", line 135, in ValidateAlgorithmSettings
    raise NotImplementedError('Method not implemented!')
NotImplementedError: Method not implemented!
INFO:hyperopt.tpe:build_posterior_wrapper took 0.002016 seconds
INFO:hyperopt.tpe:TPE using 0 trials

After

$ kubectl apply -f ./examples/v1alpha3/tpe-example.yaml
$ kubectl -n kubeflow logs tpe-example-tpe-94b986568-6wphh
INFO:hyperopt.tpe:build_posterior_wrapper took 0.001426 seconds
INFO:hyperopt.tpe:TPE using 0 trials

Copy link
Member

@gaocegege gaocegege left a comment

Choose a reason for hiding this comment

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

LGTM.

FYI, This year we will add validation for all algortihms.

/lgtm
/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gaocegege

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 93f46f2 into kubeflow:master Apr 9, 2020
@c-bata c-bata deleted the fix-hyperopt-service branch April 9, 2020 03:41
c-bata added a commit to c-bata/katib that referenced this pull request Apr 9, 2020
sperlingxx pushed a commit to sperlingxx/katib that referenced this pull request Jul 9, 2020
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.

4 participants