WANDB根据标签获得运行ID
上下文
嗨!
在Wandb
中,我可以根据标签下载一个模型(例如prod
),但是我也想获得与使用标签运行的所有指标。
问题是我不知道如何获得基于特定运行ID的标签。
示例
使用代码波纹管,我们可以提取运行摘要指标,但是设置运行ID是让我退回。
因此,如果我可以根据标签获得运行ID,或者只是通过另一个API调用明确下载指标,例如在api.run
中使用特殊的sintax,那真是太好了!在代码示例中,我想使用what_i_want_to_use
字符串来调用API而不是what_i_use
。
import wandb
from ast import literal_eval
api = wandb.Api()
what_i_use = "team_name/project_name/runID_h3h3h4h4h4h4"
# what_i_want_to_use = "team_name/project_name/artifact_name/prod_tag"
# run is specified by <entity>/<project>/<run_id>
run = api.run(what_i_use)
# save the metrics for the run to a csv file
metrics_dataframe = run.summary
print(metrics_dataframe['a_summary_metric'])
通过贯穿文档,我到目前为止尚未找到任何解决方案。有没有理智的人?
感谢您的阅读!
Context
Hi!
In wandb
I can download a model based on a tag (prod
for example), but I would like to also get all metrics associated to that run by using tags.
The problem is that I don't know how to a get specific run ID based a tag.
Example
Using the code bellow we can extract a run summary metrics, but setting run IDs is setting me back.
So if I can get run IDs based on tag or just explicitly download metrics with another API call, like with a special sintax in api.run
, that would be great! In the code example bellow I would like to use the what_i_want_to_use
string to call the API instead of what_i_use
.
import wandb
from ast import literal_eval
api = wandb.Api()
what_i_use = "team_name/project_name/runID_h3h3h4h4h4h4"
# what_i_want_to_use = "team_name/project_name/artifact_name/prod_tag"
# run is specified by <entity>/<project>/<run_id>
run = api.run(what_i_use)
# save the metrics for the run to a csv file
metrics_dataframe = run.summary
print(metrics_dataframe['a_summary_metric'])
By running through the docs I didn't find any solution so far. Any ideias?
Thanks for reading!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也可以通过标签过滤运行。您可以阅读有关它的更多信息在这里:
It is possible to filter runs by tags as well. You can read more about it here: