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

feat: Support bayesianoptimization in v1alpha2 #595

Merged
merged 11 commits into from
Jun 3, 2019

Conversation

gaocegege
Copy link
Member

@gaocegege gaocegege commented May 28, 2019

Signed-off-by: Ce Gao gaoce@caicloud.io

What this PR does / why we need it:

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

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:



This change is Reviewable

@gaocegege gaocegege changed the title feat: Support bayesianoptimization in v1alpha2 WIP feat: Support bayesianoptimization in v1alpha2 May 29, 2019
Copy link
Member Author

@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.

for x_next in x_next_list:
x_next = x_next.squeeze()
self.logger.debug("xnext: %r ", x_next, extra={
"StudyID": request.study_id})
Copy link
Member

Choose a reason for hiding this comment

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

Similar comment


@property
def experiment_name(self):
""" return the study id """
Copy link
Member

Choose a reason for hiding this comment

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

s/study id/experiment name


@property
def experiment(self):
""" return the study configuration """
Copy link
Member

Choose a reason for hiding this comment

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

Similar comment

self.manager_port = 6789
if logger == None:
self.logger = getLogger(__name__)
FORMAT = '%(asctime)-15s StudyID %(studyid)s %(message)s'
Copy link
Member

Choose a reason for hiding this comment

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

Should it be experimentname?

experiment_name=experiment_name
))
for t in trialsrep.trials:
if t.status.condition == 2:
Copy link
Member

@andreyvelich andreyvelich May 30, 2019

Choose a reason for hiding this comment

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

Should we change 2 to api_pb2.TrialStatus.TrialConditionType.SUCCEEDED ?

gwfrep = client.GetObservationLog(
api_pb2.GetObservationLogRequest(
trial_name=t.name,
metric_name=obj_name))
Copy link
Member

Choose a reason for hiding this comment

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

You have missed timeout here. It should be like this:

gwfrep = client.GetObservationLog(
                        api_pb2.GetObservationLogRequest(
                            trial_name=t.name,
                            metric_name=obj_name),10)

trial_name=t.name,
metric_name=obj_name))
w = gwfrep.observation_log
for ml in w.metrics_logs:
Copy link
Member

Choose a reason for hiding this comment

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

metrics_logs -> metric_logs

w = gwfrep.observation_log
for ml in w.metrics_logs:
if ml.name == obj_name:
y_train.append(float(ml.values[-1].value))
Copy link
Member

Choose a reason for hiding this comment

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

Should it be like this:

 if ml.metric.name == obj_name:
       y_train.append(float(ml.metric.value))

?

metric_name=obj_name))
w = gwfrep.observation_log
for ml in w.metrics_logs:
if ml.name == obj_name:
Copy link
Member

Choose a reason for hiding this comment

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

I don't think, that we need condition here, we select values only for metric_name=obj_name

@gaocegege
Copy link
Member Author

Found some bugs during the test, I will fix it

/hold

@gaocegege
Copy link
Member Author

/hold cancel

/assign @andreyvelich @johnugeorge

Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
@gaocegege
Copy link
Member Author

@andreyvelich Fixed, thanks for the review.

from .utils import get_logger


def deal_with_discrete(feasible_values, current_value):
Copy link
Member

Choose a reason for hiding this comment

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

This contains utils that are already in parsing_utils. We can merge it later.

Copy link
Member Author

Choose a reason for hiding this comment

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

SGTM.

@johnugeorge
Copy link
Member

/lgtm
We should also plan for unittests for suggestion algorithms

Copy link
Member Author

@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.

/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 removed the lgtm label Jun 3, 2019
@johnugeorge
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot merged commit 0f6fdeb into kubeflow:master Jun 3, 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.

5 participants