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

clearer comments about config serialization

parent 30a8efce
No related branches found
No related tags found
1 merge request!60Resume from existing mlflow run
This commit is part of merge request !60. Comments created here will be created in the context of that merge request.
......@@ -239,7 +239,10 @@ def get_config():
def serialize_config(config):
"""
Serialize a dictionary to transform it into json and remove the credentials
Make every field of the configuration JSON-Serializable and remove sensitive information.
- Classes are transformed using their name attribute
- Functions are casted to strings
"""
# Create a copy of the original config without erase it
serialized_config = deepcopy(config)
......@@ -282,6 +285,7 @@ def serialize_config(config):
"synthetic_data" in config["dataset_params"]["config"]
and config["dataset_params"]["config"]["synthetic_data"]
):
# The Probability scheduler is a function and needs to be casted to string
serialized_config["dataset_params"]["config"]["synthetic_data"][
"proba_scheduler_function"
] = str(
......
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