Exemple #1
0
 def to_proto(self):
     # returns mlflow.protos.model_registry_pb2.RegisteredModel
     rmd = ProtoRegisteredModel()
     rmd.name = self.name
     if self.creation_timestamp is not None:
         rmd.creation_timestamp = self.creation_timestamp
     if self.last_updated_timestamp:
         rmd.last_updated_timestamp = self.last_updated_timestamp
     if self.description:
         rmd.description = self.description
     if self.latest_versions is not None:
         rmd.latest_versions.extend([
             model_version.to_proto()
             for model_version in self.latest_versions
         ])
     rmd.tags.extend([
         ProtoRegisteredModelTag(key=key, value=value)
         for key, value in self._tags.items()
     ])
     return rmd
Exemple #2
0
 def to_proto(self):
     # returns mlflow.protos.model_registry_pb2.RegisteredModel
     registered_model = ProtoRegisteredModel()
     registered_model.name = self.name
     return registered_model