Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INVALID_PARAMETER_VALUE: Model registry functionality is unavailable #400

Closed
andrewcstewart opened this issue Feb 1, 2023 · 4 comments · Fixed by #403
Closed

INVALID_PARAMETER_VALUE: Model registry functionality is unavailable #400

andrewcstewart opened this issue Feb 1, 2023 · 4 comments · Fixed by #403

Comments

@andrewcstewart
Copy link

If you like the repo, please give it a ⭐

Description

While trying to use kedro-mlflow with sqlite backend, I receive the following error in the UI:

INVALID_PARAMETER_VALUE: Model registry functionality is unavailable; got unsupported URI 'file:///kedro/data/06_models' for model registry data storage. Supported URI schemes are: ['postgresql', 'mysql', 'sqlite', 'mssql']. See https://www.mlflow.org/docs/latest/tracking.html#storage for how to run an MLflow server against one of the supported backend storage locations.

mlflow.yml is the default generated configuration with the following changes:

server:
  mlflow_tracking_uri: data/06_models/ # if null, will use mlflow.get_tracking_uri() as a default
  mlflow_registry_uri: data/06_models/registry.db # if null, mlflow_tracking_uri will be used as mlflow default

Happy to submit a more thorough issue w/ reproducibility information etc, but want to first sanity check if there is an obvious mistake in my understanding of the registry configuration?

@Galileo-Galilei
Copy link
Owner

Hi @andrewcstewart, actually your configuration is almost correct: when you do not specify the dialect of your URIs, they are interpreted as local uri, and so they are converted to an absolute path prepended with file:///. This actually makes senses: if you use a relative path, mlflow cannot "guess" what type of database you are using.

You need to use an absolute path, and to preprend it with sqlite:/// dialect, so your configuration becomes:

server:
  mlflow_tracking_uri: data/06_models/ # <- ok, if it is relative it will create a mlruns folder here
  mlflow_registry_uri: sqlite:///absolute/path/to/data/06_models/registry.db # <- change this line

@andrewcstewart
Copy link
Author

Aha, that makes sense. The thought occurred to me but I thought I pulled that directly from an example in the docs and figured the plugin's automatic handling of relative paths -> abs paths must also be autodetecting .db as sqlite.

Anyway, thanks!

@Galileo-Galilei
Copy link
Owner

I think I should rather correct the documentation than trying to autodetect sqlite URI 😅 The URI validation logic is already quite complicated due to subtle differences between linux / windows / macOS.

This would make extra assumptions (is your .db really a sqlite file? there are a lot of other possibilities! Is .db the only extension I should detect? This is likely the most common, but it is not completely standardized), and I don't think Ishould go against mlflow decisions here.

I let the issue open to remember to correct the documentation which is indeed incorrect.

@andrewcstewart
Copy link
Author

Little bit of missing context behind my presumption there is I had come across some issue over at https://github.com/mlflow/mlflow about defaulting to sqlite:// when registry_uri contains .db (or something along those lines).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants