예제 #1
0
파일: test_utils.py 프로젝트: vibhatha/tfx
 def _get_artifacts_with_type_and_pipeline(
         self, type_name: Text,
         pipeline_name: Text) -> List[metadata_store_pb2.Artifact]:
     """Helper function returns artifacts of specified pipeline and type."""
     request = metadata_store_service_pb2.GetArtifactsByTypeRequest(
         type_name=type_name)
     all_artifacts = self._stub.GetArtifactsByType(request).artifacts
     return [
         artifact for artifact in all_artifacts
         if artifact.custom_properties['pipeline_name'].string_value ==
         pipeline_name
     ]
예제 #2
0
    def get_artifacts_by_type(
            self, type_name: Text) -> List[metadata_store_pb2.Artifact]:
        """Gets all the artifacts of a given type."""
        request = metadata_store_service_pb2.GetArtifactsByTypeRequest()
        request.type_name = type_name
        response = metadata_store_service_pb2.GetArtifactsByTypeResponse()

        self._call('GetArtifactsByType', request, response)
        result = []
        for x in response.artifacts:
            result.append(x)
        return result
예제 #3
0
파일: test_utils.py 프로젝트: vibhatha/tfx
 def _get_artifacts_with_type(
         self, type_name: Text) -> List[metadata_store_pb2.Artifact]:
     """Helper function returns artifacts with given type."""
     request = metadata_store_service_pb2.GetArtifactsByTypeRequest(
         type_name=type_name)
     return self._stub.GetArtifactsByType(request).artifacts