diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6b8710a --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ff73c0b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM continuumio/miniconda3:latest + +MAINTAINER JianKai Wang "https://jiankaiwang.no-ip.biz" + +ADD . /app +WORKDIR /app + +RUN pip install mlflow \ No newline at end of file diff --git a/quickstart/mlflow_tracking.py b/quickstart/mlflow_tracking.py new file mode 100644 index 0000000..6e0abb1 --- /dev/null +++ b/quickstart/mlflow_tracking.py @@ -0,0 +1,20 @@ +import os +from random import random, randint + +from mlflow import log_metric, log_param, log_artifacts + +if __name__ == "__main__": + print("Running mlflow_tracking.py") + + log_param("param1", randint(0, 100)) + + log_metric("foo", random()) + log_metric("foo", random() + 1) + log_metric("foo", random() + 2) + + if not os.path.exists("outputs"): + os.makedirs("outputs") + with open("outputs/test.txt", "w") as f: + f.write("hello world!") + + log_artifacts("outputs")