Last active
November 27, 2019 16:54
-
-
Save jackersson/a17bc8c229c1d57d0e3806c3aa86620d to your computer and use it in GitHub Desktop.
MLFlow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import mlflow # import log_metric, log_param, log_artifact | |
| # https://www.youtube.com/watch?v=wb-ZxtIwSTA | |
| def exp(metric, param): | |
| mlflow.set_tracking_uri("http://mlflow:NJKbe21jk4e1@ec2-18-184-150-238.eu-central-1.compute.amazonaws.com/") | |
| exp_name = "smart-counter" | |
| mlflow.set_experiment(exp_name) | |
| with mlflow.start_run(nested=True): | |
| mlflow.log_param("param1", param) | |
| mlflow.set_tag("release", "v0.0.1") | |
| with open("info.txt", "w") as f: | |
| f.write("Hi artifact") | |
| mlflow.log_artifact("info.txt") | |
| mlflow.log_metric(key="counter", value=metric) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment