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

Adding random suggestion algorithm implementation and manifests #540

Merged
merged 2 commits into from
May 17, 2019

Conversation

johnugeorge
Copy link
Member

@johnugeorge johnugeorge commented May 17, 2019

This PR implements the random suggestion algorithm. I have tested it independently using API manager. Controller changes will be added separately.

Related: #407

Fixes are made into the base changes from #435


This change is Reviewable

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

pkg/suggestion/v1alpha2/test.py Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm label May 17, 2019
@hougangliu
Copy link
Member

/lgtm

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

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.

/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 a0aab3a into kubeflow:master May 17, 2019
Copy link
Contributor

@richardsliu richardsliu left a comment

Choose a reason for hiding this comment

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

Mostly just comments related to code organization.

self.manager_addr = "katib-manager"
self.manager_port = 6789

def _get_experiment(self, name):
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be part of a common lib?

return y_array


def parse_x_next_vector(x_next, param_types, param_names, discrete_info, categorical_info):
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit - The names of these methods (and the class) feel somewhat weird. "Parse*" seems to suggest taking in a string and extracting the contents from it.

if len(self.names) != len(set(self.names)):
raise Exception("Parameter names are not unique.")

def create_scaler(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these methods need to be in this class? They seem to be specific to Bayestian optimization and random search respectively, so maybe they should just be in the specific algorithms.

Also the file name should be parameter_config.py.


def parse_metric(y_train, goal):
"""
Parse the metric to the dictionary
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't return a dictionary?

return feasible_values[int(index)]


def parse_parameter_configs(parameter_configs):
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like this would belong in the ParameterConfig class.

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