def store_path(self, artifact, path, name=None, checksum=True, max_objects=None):
// Resolve the reference until the result is a concrete asset
// so that we don"t have multiple hops.
artifact_id, artifact_file_path = WBArtifactHandler.parse_path(path)
target_artifact = PublicApi().artifact_from_id(util.hex_to_b64_id(artifact_id))
entry = target_artifact._manifest.get_entry_by_path(artifact_file_path)
while entry.ref is not None and urlparse(entry.ref).scheme == self._scheme:
artifact_id, artifact_file_path = WBArtifactHandler.parse_path(entry.ref)
After Change
// Recursively resolve the reference until a concrete asset is found
while path is not None and urlparse(path).scheme == self._scheme:
artifact_id = util.host_from_path(path)
artifact_file_path = util.uri_from_path(path)
target_artifact = PublicArtifact.from_id(
util.hex_to_b64_id(artifact_id), self.client
)
// this should only have an effect if the user added the reference by url
// string directly (in other words they did not already load the artifact into ram.)
target_artifact._load_manifest()
entry = target_artifact._manifest.get_entry_by_path(artifact_file_path)
path = entry.ref
// Create the path reference
path = "wandb-artifact://{}/{}".format(
util.b64_to_hex_id(target_artifact.id), artifact_file_path