Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
vanpelt committed Sep 9, 2020
1 parent 2cb3ff0 commit b24cb62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions wandb/apis/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,10 +1092,10 @@ def use_artifact(self, artifact):
api.use_artifact(artifact.id)
return artifact
elif isinstance(artifact, wandb.Artifact):
raise ValueError("Only existing artifacts are excepted by this api. "
raise ValueError("Only existing artifacts are accepted by this api. "
"Manually create one with `wandb artifacts put`")
else:
raise ValueError('You must wandb.Api().artifact() to use_artifact')
raise ValueError('You must pass a wandb.Api().artifact() to use_artifact')

@normalize_exceptions
def log_artifact(self, artifact, aliases=None):
Expand All @@ -1118,10 +1118,10 @@ def log_artifact(self, artifact, aliases=None):
artifact.digest, aliases=aliases)
return artifact
elif isinstance(artifact, wandb.Artifact):
raise ValueError("Only existing artifacts are excepted by this api. "
raise ValueError("Only existing artifacts are accepted by this api. "
"Manually create one with `wandb artifacts put`")
else:
raise ValueError('You must wandb.Api().artifact() to use_artifact')
raise ValueError('You must pass a wandb.Api().artifact() to use_artifact')

@property
def summary(self):
Expand Down
3 changes: 2 additions & 1 deletion wandb/internal/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,11 @@ def send_artifact(self, data):
is_user_created=artifact.user_created,
)

metadata = json.loads(artifact.metadata) if artifact.metadata else None
saver.save(
type=artifact.type,
name=artifact.name,
metadata=json.loads(artifact.metadata or "{}"),
metadata=metadata,
description=artifact.description,
aliases=artifact.aliases,
use_after_commit=artifact.use_after_commit,
Expand Down

0 comments on commit b24cb62

Please sign in to comment.