MLflow
TechnologyML
MLflow Tracking Server
# start
mlflow server --host 127.0.0.1 --port 8080
Once you started the tracking server, you can connect your local clients by set the MLFLOW_TRACKING_URI
environment variable to the server’s URI, along with its scheme and port (for example, http://10.0.0.1:5000
) or call [mlflow.set_tracking_uri()](https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.set_tracking_uri)
.
The mlflow.start_run(), mlflow.log_param(), and mlflow.log_metric() calls then make API requests to your remote tracking server.
Artifact Stores
Supported storage types for the Artifact Store
SFTP Server
- To store artifacts in an SFTP server, specify a URI of the form
sftp://user@host/path/to/directory
. You should configure the client to be able to log in to the SFTP server without a password over SSH (e.g. public key, identity file in ssh_config, etc.). - The format
sftp://user:pass@host/
is supported for logging in. However, for safety reasons this is not recommended. - When using this store,
pysftp
must be installed on both the server and the client. Runpip install pysftp
to install the required package.
Others
- backend store is used to store experiment and metadata (parameters, metrics, tags) in MLflow Tracking Server. MLflow supports two types of backend stores:
- File Store
- Database Store
- artifact store is a storage unit for large data (e.g. S3 bucket, shared NFS file system) and is where the client records its model outputs (e.g. model files).
Code
mlflow server --backend-store-uri mysql+pymysql://user:password@host:port/mlflow --default-artifact-root sftp://user@host/path/to/directory
pkill -f "mlflow server"