Using ML Flow on a Target Server

once we have built out a server for ML flow local or otherwise we need to be able to point our data at it in order to allow it to track the expirments we are currently working on

start by making sure you have what you need installed

In [1]:
!pip install mlflow

Track some gerneal data

next lets build out some abritrary tracking to make sure we have a functional conection to the server

In [2]:
# first import the ML flow lib
import mlflow
In [29]:
#!mlflow server
[2021-12-13 15:16:42 -0500] [32659] [INFO] Starting gunicorn 20.1.0
[2021-12-13 15:16:42 -0500] [32659] [INFO] Listening at: http://127.0.0.1:5000 (32659)
[2021-12-13 15:16:42 -0500] [32659] [INFO] Using worker: sync
[2021-12-13 15:16:42 -0500] [32662] [INFO] Booting worker with pid: 32662
[2021-12-13 15:16:43 -0500] [32664] [INFO] Booting worker with pid: 32664
[2021-12-13 15:16:43 -0500] [32665] [INFO] Booting worker with pid: 32665
[2021-12-13 15:16:43 -0500] [32666] [INFO] Booting worker with pid: 32666
^C
[2021-12-13 15:17:53 -0500] [32659] [INFO] Handling signal: int
[2021-12-13 15:17:53 -0500] [32666] [INFO] Worker exiting (pid: 32666)
[2021-12-13 15:17:53 -0500] [32665] [INFO] Worker exiting (pid: 32665)
[2021-12-13 15:17:53 -0500] [32664] [INFO] Worker exiting (pid: 32664)
[2021-12-13 15:17:53 -0500] [32662] [INFO] Worker exiting (pid: 32662)
In [1]:
#set the tracking UI for ML flow - 
#%env var=$val
%env MLFLOW_TRACKING_URI = http://localhost:5000
env: MLFLOW_TRACKING_URI=http://localhost:5000
In [ ]:
#set the tracking UI for ML flow - 
#mlflow.set_tracking_uri('http://localhost:5000')


# # start ml flow and set starting run params
with mlflow.start_run(run_name="MLflow Tracking Test"):
  mlflow.log_metric("m1", 7.0)
  mlflow.log_param("p1", "mlflow-tracking-test")

# # run tracking UI in the background
# get_ipython().system_raw("mlflow ui --port 5000 &")

print('RAN expirments')
In [ ]: