From 2f15b0f7e596453f38de4ce8748ff2b231382a50 Mon Sep 17 00:00:00 2001 From: Ayush Chaurasia Date: Fri, 7 May 2021 23:23:56 +0530 Subject: [PATCH] Explicitly convert artifact path to posix_path (#3067) * Explicitly convert artifact path to posix_path * Remove redudant str() casting (cherry picked from commit d2a17289c99ad45cb901ea81db5932fa0ca9b711) --- utils/wandb_logging/wandb_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/wandb_logging/wandb_utils.py b/utils/wandb_logging/wandb_utils.py index 6c4385e93670..3f03f0bb66e9 100644 --- a/utils/wandb_logging/wandb_utils.py +++ b/utils/wandb_logging/wandb_utils.py @@ -159,7 +159,8 @@ def setup_training(self, opt, data_dict): 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