def describe_studie(args): client = AdvisorClient() study = client.get_study_by_name(args.study_name) # Print study table = PrettyTable() table.field_names = [ "Id", "Name", "Algorithm", "Status", "Create", "Updated" ] table.add_row([ study.id, study.name, study.algorithm, study.status, study.created_time, study.updated_time ]) print(table) # Print study configuration """ table = PrettyTable() table.field_names = ["Configuration"] table.add_row([study.study_configuration]) print(table) """ pprint.pprint(json.loads(study.study_configuration)) # Print related trials study_trials = client.list_trials(args.study_name) if (len(study_trials)) > 0: print_trials_as_table(study_trials)
from advisor_client.model import TrialMetric from advisor_client.client import AdvisorClient client = AdvisorClient() # Create Study name = "Study" study_configuration = { "goal": "MAXIMIZE", "maxTrials": 5, "maxParallelTrials": 1, "params": [{ "parameterName": "hidden1", "type": "INTEGER", "minValue": 40, "maxValue": 400, "scalingType": "LINEAR" }] } study = client.create_study(name, study_configuration) print(study) print(client.list_studies()) trials = client.get_suggestions(study.id, 3) print(trials) print(client.list_trials(study.id))
def list_trials(args): client = AdvisorClient() print_trials(client.list_trials(args.study_id))
def list_trials(args): client = AdvisorClient() print_trials_as_table(client.list_trials(args.study_name))
def list_trials(args): client = AdvisorClient() print_trials(client.list_trials(args.study_id))
from advisor_client.model import TrialMetric from advisor_client.client import AdvisorClient client = AdvisorClient() # Create Study name = "Study" study_configuration = { "goal": "MAXIMIZE", "maxTrials": 5, "maxParallelTrials": 1, "params": [{ "parameterName": "hidden1", "type": "INTEGER", "minValue": 40, "maxValue": 400, "scallingType": "LINEAR" }] } study = client.create_study(name, study_configuration) print(study) print(client.list_studies()) trials = client.get_suggestions(study.id, 3) print(trials) print(client.list_trials(study.id))