Skip to content

Using InfinStor Mlflow Tracking

InfinStor Mlflow Tracking Server is a cloud native implementation using AWS Lambda and AWS DynamoDB. It is highly scalable and can support any number of users concurrenlty, without having to resize sql databases or REST server components.

The InfinStor mlflow plugin has components for the following mlflow functions:

  • mlflow tracking
  • mlflow projects
  • mlflow artifacts

Components

InfinStor mlflow tracking consists of the following components:

  • mlflow server as a service, operated in the cloud
  • plugin components for authenticating to the InfinStor service

Logging in

First, login to the InfinStor service as follows:

python -m infinstor_mlflow_plugin.login

mlflow CLI

InfinStor mlflow server is configured using the environment variable MLFLOW_TRACKING_URI. For example, in the case of bash:

export MLFLOW_TRACKING_URI=infinstor://infinstor.com/
mlflow experiments list

It may be convenient to add the line 'export MLFLOW_TRACKING_URI=infinstor://infinstor.com/' to an init script such as ~/.bashrc

Tracking an mlflow run using the InfinStor mlflow Tracking service

mlflow includes the ability to run projects such as tensorflow, pytorch, xgboost, etc. The InfinStor mlflow service is fully compatible with tracking mlflow projects run in this manner. The following example shows the xgboost example program run using mlflow and tracked using InfinStor mlflow service

(base) jagane@jaganeworkstation:~/working/mlflow/examples/xgboost$ mlflow run . -P learning_rate=0.2 -P colsample_bytree=0.8 -P subsample=0.9
2020/08/18 11:55:20 INFO mlflow.projects: === Created directory /tmp/tmpmvg6lpo8 for downloading remote URIs passed to arguments of type 'path' ===
2020/08/18 11:55:20 INFO mlflow.projects: === Running command 'source /home/jagane/anaconda3/bin/../etc/profile.d/conda.sh && conda activate mlflow-63ae841224f06799150ac4cc3f96c02f2aa78a44 1>&2 && python train.py \
  --learning-rate=0.2 \
  --colsample-bytree=0.8 \
  --subsample=0.9
' in run with ID '0-cfb74e1c4990491c8525544d58fed728' === 
/home/jagane/anaconda3/envs/mlflow-63ae841224f06799150ac4cc3f96c02f2aa78a44/lib/python3.6/site-packages/mlflow/xgboost.py:334: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
  all_arg_names = inspect.getargspec(original)[0]  # pylint: disable=W1505
[0] train-mlogloss:0.86104
[1] train-mlogloss:0.69383
[2] train-mlogloss:0.56745
[3] train-mlogloss:0.47074
[4] train-mlogloss:0.39099
[5] train-mlogloss:0.32979
[6] train-mlogloss:0.28083
[7] train-mlogloss:0.24265
[8] train-mlogloss:0.20944
[9] train-mlogloss:0.18186
2020/08/18 11:55:40 INFO mlflow.projects: === Run (ID '0-cfb74e1c4990491c8525544d58fed728') succeeded ===

You can now track the experiment run progress using the mlflow UI as shown below