-
Notifications
You must be signed in to change notification settings - Fork 460
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/assign @johnugeorge @hougangliu
5f5dbdc
to
7f5b0a4
Compare
for x_next in x_next_list: | ||
x_next = x_next.squeeze() | ||
self.logger.debug("xnext: %r ", x_next, extra={ | ||
"StudyID": request.study_id}) |
There was a problem hiding this comment.
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 """ |
There was a problem hiding this comment.
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 """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment
pkg/suggestion/v1alpha2/bayesianoptimization/src/algorithm_manager.py
Outdated
Show resolved
Hide resolved
self.manager_port = 6789 | ||
if logger == None: | ||
self.logger = getLogger(__name__) | ||
FORMAT = '%(asctime)-15s StudyID %(studyid)s %(message)s' |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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
Found some bugs during the test, I will fix it /hold |
/hold cancel /assign @andreyvelich @johnugeorge |
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
@andreyvelich Fixed, thanks for the review. |
from .utils import get_logger | ||
|
||
|
||
def deal_with_discrete(feasible_values, current_value): |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM.
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[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 |
/lgtm |
Signed-off-by: Ce Gao [email protected]
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:
Release note:
This change is