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

last requests

parent 812aa522
No related branches found
No related tags found
1 merge request!60Resume from existing mlflow run
......@@ -24,7 +24,11 @@ try:
MLFLOW = True
logger.info("MLflow Logging available.")
<<<<<<< HEAD
from dan.mlflow import make_mlflow_request, start_mlflow_run
=======
from dan.mlflow import start_mlflow_run, make_mlflow_request
>>>>>>> e8dfc5f (last requests)
except ImportError:
MLFLOW = False
......@@ -71,9 +75,15 @@ def get_config():
"""
Retrieve model configuration
"""
<<<<<<< HEAD
dataset_name = "esposalles"
dataset_level = "record"
dataset_variant = "_debug"
=======
dataset_name = "synist"
dataset_level = "manual_text_lines"
dataset_variant = ""
>>>>>>> e8dfc5f (last requests)
dataset_path = "."
params = {
"mlflow": {
......@@ -294,9 +304,16 @@ def run():
)
with start_mlflow_run(config["mlflow"]) as run:
logger.info(f"Started MLflow run with ID ({run.info.run_id})")
<<<<<<< HEAD
make_mlflow_request(
mlflow_method=mlflow.set_tags, tags={"Dataset": dataset_name}
=======
make_mlflow_request(
mlflow_method=mlflow.set_tags,
tags={"Dataset": dataset_name}
>>>>>>> e8dfc5f (last requests)
)
# Get the labels json file
......@@ -304,16 +321,24 @@ def run():
labels_artifact = json.load(json_file)
# Log MLflow artifacts
<<<<<<< HEAD
for artifact, filename in [
(config_artifact, "config.json"),
(labels_artifact, "labels.json"),
]:
=======
for artifact, filename in [(config_artifact, "config.json"), (labels_artifact, "labels.json")]:
>>>>>>> e8dfc5f (last requests)
make_mlflow_request(
mlflow_method=mlflow.log_dict,
dictionary=artifact,
artifact_file=filename,
)
<<<<<<< HEAD
=======
>>>>>>> e8dfc5f (last requests)
if (
config["training_params"]["use_ddp"]
and not config["training_params"]["force_cpu"]
......
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