] = None,

model_source_uri: Optional[str] = None,tags: Optional[Dict[str, str]] = None,

**kwargs: Any,

) -> List[RegistryModelVersion]:

"""Lists all model versions for a registered model."""

@abstractmethod

def get_model_version(self, name: str, version: str) -> RegistryModelVersion:

"""Gets a model version for a registered model."""

@abstractmethod

def load_model_version(

self,

name: str,

version: str,

**kwargs: Any,

) -> Any:

"""Loads a model version from the model registry."""

@abstractmethod

def get_model_uri_artifact_store(

self,

model_version: RegistryModelVersion,

) -> str:

"""Gets the URI artifact store for a model version."""

This is a slimmed-down version of the base implementation which aims to highlight the abstraction layer. To see the full implementation and get the complete docstrings, please check the source code on GitHub .

Build your own custom model registry

If you want to create your own custom flavor for a model registry, you can follow the following steps:

Learn more about the core concepts for the model registry here. Your custom model registry will be built on top of these concepts so it helps to be aware of them.

Create a class that inherits from BaseModelRegistry and implements the abstract methods.

Create a ModelRegistryConfig class that inherits from BaseModelRegistryConfig and adds any additional configuration parameters that you need.

Bring the implementation and the configuration together by inheriting from the BaseModelRegistryFlavor class. Make sure that you give a name to the flavor through its abstract property.

Once you are done with the implementation, you can register it through the CLI with the following command:

zenml model-registry flavor register <IMAGE-BUILDER-FLAVOR-SOURCE-PATH>

It is important to draw attention to how and when these base abstractions are coming into play in a ZenML workflow.

The CustomModelRegistryFlavor class is imported and utilized upon the creation of the custom flavor through the CLI.