Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import os
  2. from mlflow import log_metric, log_param, log_artifact
  3.  
  4. if __name__ == "__main__":
  5. # Log a parameter (key-value pair)
  6. log_param("param1", 5)
  7.  
  8. # Log a metric; metrics can be updated throughout the run
  9. log_metric("foo", 1)
  10. log_metric("foo", 2)
  11. log_metric("foo", 3)
  12.  
  13. # Log an artifact (output file)
  14. with open("output.txt", "w") as f:
  15. f.write("Hello world!")
  16. log_artifact("output.txt")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement