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

Add API for function variables, Remove Slo class from search_space #30

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/json_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@
"upper_bound": {"type": "number"},
"step": {"type": "number"},
"choices":{"type":"array"}
},
"slo_class": {"type": "string"},
},
"direction": {"type": "string"},
},
"required": ["experiment_name", "experiment_id", "total_trials", "objective_function", "tunables", "direction"]
"required": ["experiment_name", "total_trials", "objective_function", "tunables", "direction"]
}
},
"required": ["search_space", "operation"],
Expand Down
13 changes: 6 additions & 7 deletions src/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,13 @@ def get_search_create_study(search_space_json, operation):
hpo_service.instance.startExperiment(id_)


def get_search_space(id_, url):
"""Perform a GET request and return the search space json."""
params = {"id": id_}
r = requests.get(url, params)
# TODO: Update below API
def get_function_variables(url):
"""Perform a GET request and get the function variables"""
r = requests.get(url)
r.raise_for_status()
search_space_json = r.json()
return search_space_json

function_variable_json = r.json()
return function_variable_json


def main():
Expand Down