Bài viết phổ biến của tác giả
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
mlflow.active_run()
什么都不返回所以我不能只使用current_rui_id = mlflow.active_run().info.run_id
我必须得到 run_id 在此构造内部,以便能够继续记录另一个块内的参数、指标和工件,但对于同一模型:
with mlflow.start_run(run_name="test_ololo"):
"""
fitting a model here ...
"""
for name, val in metrics:
mlflow.log_metric(name, np.float(val))
# Log our parameters into mlflow
for k, v in params.items():
mlflow.log_param(key=k, value=v)
pytorch.log_model(learn.model, f'model')
mlflow.log_artifact('./outputs/fig.jpg')
with mlflow.start_run(run_id="215d3a71925a4709a9b694c45012988a"):
"""
fit again
log_metrics
"""
pytorch.log_model(learn.model, f'model')
mlflow.log_artifact('./outputs/fig2.jpg')
1 Câu trả lời
with mlflow.start_run(run_name="test_ololo") as run:
run_id = run.info.run_id
mlflow.log_metric("metric_1", metric_val)
关于python - 如何在 mlflow.start_run() 中获取当前的 run_id?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59827478/
Tôi là một lập trình viên xuất sắc, rất giỏi!