Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
extend test
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipMay committed Mar 8, 2021
1 parent f05a54d commit aa77e2c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/test_omlflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def _objective_func(trial):
# do folds
for i in range(num_folds):
result = (x - 2) ** 2
om.log_iter({"x": result}, i)
om.log_iter({"result": result}, i)
results.append(result)

result = np.mean(results)
Expand Down Expand Up @@ -45,11 +45,8 @@ def test_study_name(tmpdir):
run_infos = mlfl_client.list_run_infos(experiment_id)
assert len(run_infos) == n_trials + n_trials * num_folds

first_run_id = run_infos[0].run_id
first_run_id = run_infos[-1].run_id
first_run = mlfl_client.get_run(first_run_id)
first_run_dict = first_run.to_dictionary()
assert "x" in first_run_dict["data"]["params"]
assert "y" in first_run_dict["data"]["params"]
assert "z" in first_run_dict["data"]["params"]
assert first_run_dict["data"]["tags"]["direction"] == "MINIMIZE"
assert first_run_dict["data"]["tags"]["state"] == "COMPLETE"

0 comments on commit aa77e2c

Please sign in to comment.