From 60a565098c7578ed15b7064a1018ce2f0b6ffa93 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Mon, 9 May 2022 17:05:50 +0200 Subject: [PATCH] Add MLproject for MLFlow --- .gitignore | 1 + MLproject | 14 ++++++++++++++ train_model.py | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 MLproject diff --git a/.gitignore b/.gitignore index a483171..9c84979 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ evaluation_results.txt model_out trend.png sacred_runs +mlruns diff --git a/MLproject b/MLproject new file mode 100644 index 0000000..4e16387 --- /dev/null +++ b/MLproject @@ -0,0 +1,14 @@ +name: ium_s444409 + +docker_env: + image: s444409-create-dataset + volumes: ["/tmp/mlruns:/mlruns:rw"] + +entry_points: + main: + parameters: + epochs: {type: float, default: 5} + batch_size: {type: float, default: 64} + command: "python train_model.py -e {epochs} -b {batch_size}" + eval: + command: "python eval_model.py" \ No newline at end of file diff --git a/train_model.py b/train_model.py index 87fc38f..5bdd938 100644 --- a/train_model.py +++ b/train_model.py @@ -12,7 +12,7 @@ default_epochs = 5 device = "cuda" if torch.cuda.is_available() else "cpu" -mlflow.set_tracking_uri("http://172.17.0.1:5000") +#mlflow.set_tracking_uri("http://172.17.0.1:5000") mlflow.set_experiment("s444409")