Skip to content

Commit

Permalink
two apis quick hack
Browse files Browse the repository at this point in the history
  • Loading branch information
jrybicki-jsc committed Feb 5, 2024
1 parent fe1575c commit 384cf56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions model_search_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ def uploat_to_mlflow(temp_dir, **context):
metrics=['mean_test_score', 'mean_fit_time']

for i, p in enumerate(dct['params'].values()):
with mlflow.start_run():
with mlflow.start_run(experiment_id=experiment_id):
p = json.loads(p.replace('\'', '"'))
for parname, parvalue in p.items():
client.log_param(key=parname, value=parvalue)
mlflow.log_param(key=parname, value=parvalue)

for m in metrics:
print(f"Logging metric {m} {dct[m][i]}")
client.log_metric(key=m, value=dct[m][i])
mlflow.log_metric(key=m, value=dct[m][i])

#clean up
if 'temp_dir' in attrs:
Expand Down

0 comments on commit 384cf56

Please sign in to comment.