WANDB根据标签获得运行ID

发布于 2025-01-22 08:15:12 字数 984 浏览 0 评论 0原文

上下文

嗨!

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'])

通过贯穿文档,我到目前为止尚未找到任何解决方案。有没有理智的人?

wandb public api运行详细信息

感谢您的阅读!

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?

wandb public api run details

Thanks for reading!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雪花飘飘的天空 2025-01-29 08:15:12

也可以通过标签过滤运行。您可以阅读有关它的更多信息在这里

You can filter by config.*, summary_metrics.*, tags, state, entity, createdAt, etc.

It is possible to filter runs by tags as well. You can read more about it here:

You can filter by config.*, summary_metrics.*, tags, state, entity, createdAt, etc.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文