Skip to content
Snippets Groups Projects
Verified Commit 04ca87e2 authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

patch to fix config publication

parent ab881ae3
No related branches found
No related tags found
1 merge request!60Resume from existing mlflow run
......@@ -277,6 +277,19 @@ def serialize_config(config):
serialized_config["training_params"]["nb_gpu"] = str(
serialized_config["training_params"]["nb_gpu"]
)
if (
"synthetic_data" in config["dataset_params"]["config"]
and config["dataset_params"]["config"]["synthetic_data"]
):
serialized_config["dataset_params"]["config"]["synthetic_data"][
"proba_scheduler_function"
] = str(
serialized_config["dataset_params"]["config"]["synthetic_data"][
"proba_scheduler_function"
]
)
return serialized_config
......@@ -288,10 +301,8 @@ def run():
config, dataset_name = get_config()
if MLFLOW and "mlflow" in config:
config_artifact = serialize_config(config)
labels_path = (
Path(config_artifact["dataset_params"]["datasets"][dataset_name])
/ "labels.json"
Path(config["dataset_params"]["datasets"][dataset_name]) / "labels.json"
)
with start_mlflow_run(config["mlflow"]) as run:
logger.info(f"Started MLflow run with ID ({run.info.run_id})")
......@@ -305,7 +316,7 @@ def run():
# Log MLflow artifacts
for artifact, filename in [
(config_artifact, "config.json"),
(serialize_config(config), "config.json"),
(labels_artifact, "labels.json"),
]:
make_mlflow_request(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment