in tfx_addons/mlmd_client/client.py [0:0]
def get_artifact_by_type_name(self, type_name: str) -> List[Artifact]:
"""Returns artifacts of a given type.
Args:
type_name: Name of artifact type to retrieve.
Returns:
List[Artifact]: List of artifacts of given type.
"""
artifacts = self._mlmd.get_artifacts_by_context(self._context.id)
return [
artifact for artifact in artifacts
if artifact.type_id == self.artifact_types.get(type_name, -1)
]