5535b861bc9ca33dc06f92a143694040d837f3de,wandb/sdk/wandb_artifacts.py,WBArtifactHandler,store_path,#WBArtifactHandler#Any#Any#Any#Any#Any#,1212

Before Change


    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
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 13

Instances


Project Name: wandb/client
Commit Name: 5535b861bc9ca33dc06f92a143694040d837f3de
Time: 2020-11-16
Author: tim.s.sweeney@gmail.com
File Name: wandb/sdk/wandb_artifacts.py
Class Name: WBArtifactHandler
Method Name: store_path


Project Name: wandb/client
Commit Name: 5535b861bc9ca33dc06f92a143694040d837f3de
Time: 2020-11-16
Author: tim.s.sweeney@gmail.com
File Name: wandb/sdk_py27/wandb_artifacts.py
Class Name: WBArtifactHandler
Method Name: store_path


Project Name: wandb/client
Commit Name: 5535b861bc9ca33dc06f92a143694040d837f3de
Time: 2020-11-16
Author: tim.s.sweeney@gmail.com
File Name: wandb/sdk/wandb_artifacts.py
Class Name: WBArtifactHandler
Method Name: load_path


Project Name: wandb/client
Commit Name: 5535b861bc9ca33dc06f92a143694040d837f3de
Time: 2020-11-16
Author: tim.s.sweeney@gmail.com
File Name: wandb/sdk_py27/wandb_artifacts.py
Class Name: WBArtifactHandler
Method Name: load_path