This commit is contained in:
Jian-Kai Wang
2018-11-22 21:14:20 +08:00
parent 29aa989e4b
commit 88ecc200e0
3 changed files with 29 additions and 0 deletions

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
.git

8
Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
FROM continuumio/miniconda3:latest
MAINTAINER JianKai Wang "https://jiankaiwang.no-ip.biz"
ADD . /app
WORKDIR /app
RUN pip install mlflow

View File

@@ -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")