def add_association()

in src/smexperiments/tracker.py [0:0]


    def add_association(self, sagemaker_client):
        source_arn = self.source_arn if self.source_arn else self.artifact_arn
        dest_arn = self.dest_arn if self.dest_arn else self.artifact_arn
        # if the trial component (job) is the source then it produced the artifact, otherwise the
        # artifact contributed to the trial component (job)
        association_edge_type = "Produced" if self.source_arn else "ContributedTo"
        sagemaker_client.add_association(
            SourceArn=source_arn, DestinationArn=dest_arn, AssociationType=association_edge_type
        )