Ayush Chaurasia commited on
Commit
d2a1728
·
unverified ·
1 Parent(s): e97d129

Explicitly convert artifact path to posix_path (#3067)

Browse files

* Explicitly convert artifact path to posix_path

* Remove redudant str() casting

Files changed (1) hide show
  1. utils/wandb_logging/wandb_utils.py +2 -1
utils/wandb_logging/wandb_utils.py CHANGED
@@ -158,7 +158,8 @@ class WandbLogger():
158
 
159
  def download_dataset_artifact(self, path, alias):
160
  if isinstance(path, str) and path.startswith(WANDB_ARTIFACT_PREFIX):
161
- dataset_artifact = wandb.use_artifact(remove_prefix(path, WANDB_ARTIFACT_PREFIX) + ":" + alias)
 
162
  assert dataset_artifact is not None, "'Error: W&B dataset artifact doesn\'t exist'"
163
  datadir = dataset_artifact.download()
164
  return datadir, dataset_artifact
 
158
 
159
  def download_dataset_artifact(self, path, alias):
160
  if isinstance(path, str) and path.startswith(WANDB_ARTIFACT_PREFIX):
161
+ artifact_path = Path(remove_prefix(path, WANDB_ARTIFACT_PREFIX) + ":" + alias)
162
+ dataset_artifact = wandb.use_artifact(artifact_path.as_posix())
163
  assert dataset_artifact is not None, "'Error: W&B dataset artifact doesn\'t exist'"
164
  datadir = dataset_artifact.download()
165
  return datadir, dataset_artifact