如何使用 WandB API 从嵌套方法/函数获取所有项目标签?

问题描述 投票:0回答:0

如何使用 WandB API 在嵌套方法或函数中获取与项目关联的所有标签?

目前,我正在使用以下代码:

runs = api.runs(path=f"{entity}/{project}")
tags = []
for run in tqdm(runs): 
    tags.extend(run.tags)

list(set(tags))

但是,我想将此代码嵌入到更大的函数或方法中。有人可以举例说明如何实现这一目标吗?

api tags wandb
© www.soinside.com 2019 - 2024. All rights reserved.