1

If I were getting started with MLflow, then how would I set up a database store? Is it sufficient to create a new MySQL database or a SQLite database and point MLflow to that?

I tried to set the tracking URI, but that didn't create a database if it didn't exist.

2 Answers2

2

How to set up MLFlow properly

pip install the following:

PyMySQL==0.9.3
psycopg2-binary==2.8.5
werkzeug==2.0.3
mlflow
mlflow[extras]==1.14.1

Set up the artifact dir:

mkdir -p mlflow/artifacts
chmod -R 1777  mlflow

This will run a detached process in cli using SQLLite:

mlflow server --host 0.0.0.0 --backend-store-uri sqlite:///mlflow.sqlite.db --default-artifact-root './mlflow/artifacts' </dev/null &>/dev/null &     

You will then be able to see the UI, fully functioning, at: http://{{server_ip or localhost}}:5000 - If you are on a server you may have to expose the port like ufw allow 5000/tcp, or however your cloud provider wants you to do it.

Check my answer here to shut a detached mlflow process down: How to safely shutdown mlflow ui?

joe hoeller
  • 1,248
  • 12
  • 22
0

You need to create database by yourself. Mlflow creates tables automatically based on defined schema. It has no control over databases.

Hikmat
  • 57
  • 9