Unverified 提交 d2a17289 authored 作者: Ayush Chaurasia's avatar Ayush Chaurasia 提交者: GitHub

Explicitly convert artifact path to posix_path (#3067)

* Explicitly convert artifact path to posix_path * Remove redudant str() casting
上级 e97d129d
......@@ -158,7 +158,8 @@ class WandbLogger():
def download_dataset_artifact(self, path, alias):
if isinstance(path, str) and path.startswith(WANDB_ARTIFACT_PREFIX):
dataset_artifact = wandb.use_artifact(remove_prefix(path, WANDB_ARTIFACT_PREFIX) + ":" + alias)
artifact_path = Path(remove_prefix(path, WANDB_ARTIFACT_PREFIX) + ":" + alias)
dataset_artifact = wandb.use_artifact(artifact_path.as_posix())
assert dataset_artifact is not None, "'Error: W&B dataset artifact doesn\'t exist'"
datadir = dataset_artifact.download()
return datadir, dataset_artifact
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论