Beispiel #1
0
 def __init__(self, tracking_uri=None, registry_uri=None):
     """
     :param tracking_uri: Address of local or remote tracking server. If not provided, defaults
                          to the service set by ``mlflow.tracking.set_tracking_uri``. See
                          `Where Runs Get Recorded <../tracking.html#where-runs-get-recorded>`_
                          for more info.
     :param registry_uri: Address of local or remote model registry server. If not provided,
                          defaults to the service set by ``mlflow.tracking.set_registry_uri``. If
                          no such service was set, defaults to the tracking uri of the client.
     """
     final_tracking_uri = utils._resolve_tracking_uri(tracking_uri)
     self._registry_uri = registry_utils._resolve_registry_uri(registry_uri, tracking_uri)
     self._tracking_client = TrackingServiceClient(final_tracking_uri)
Beispiel #2
0
    def get_store(self, store_uri=None):
        """Get a store from the registry based on the scheme of store_uri

        :param store_uri: The store URI. If None, it will be inferred from the environment. This URI
                          is used to select which tracking store implementation to instantiate and
                          is passed to the constructor of the implementation.

        :return: An instance of `mlflow.store.model_registry.AbstractStore` that fulfills the
                 store URI requirements.
        """
        from mlflow.tracking._model_registry import utils

        resolved_store_uri = utils._resolve_registry_uri(store_uri)
        return self._get_store_with_resolved_uri(resolved_store_uri)