Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| cluster:usage_tips:mlflow [2022/09/30 09:10] – lukab | cluster:usage_tips:mlflow [2022/11/28 05:48] (current) – [Installing ML Flow] matiasrus | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| How-to-Guide for setting up and connecting to ML Flow, tracking experiments and analysing them. | How-to-Guide for setting up and connecting to ML Flow, tracking experiments and analysing them. | ||
| + | |||
| + | ML Flow Structure: | ||
| + | |||
| + | {{: | ||
| ==== Installing ML Flow ==== | ==== Installing ML Flow ==== | ||
| Line 27: | Line 31: | ||
| 4) Create a tunnel from the cluster localhost: | 4) Create a tunnel from the cluster localhost: | ||
|      |      | ||
| - |      | + | Run the following code on your computers command prompt to map the localhost ports: | 
|      |      | ||
| - |      | + | < | 
| - |     ssh -L localhost: | + | ssh -L localhost: | 
| - |     </ | + | </ | 
|      |      | ||
| 5) Open localhost: | 5) Open localhost: | ||
| Line 42: | Line 46: | ||
| import mlflow | import mlflow | ||
| - | mlflow_tracking_uri = ' | + | mlflow_tracking_uri = ' | 
| mlflow_experiment = ' | mlflow_experiment = ' | ||
| Line 54: | Line 58: | ||
| 3) Start the tracking | 3) Start the tracking | ||
| - | Track parameters  | + | Track parameters  | 
| < | < | ||
| - |      | + | mlflow.log_param(' | 
| </ | </ | ||
| Line 63: | Line 67: | ||
| < | < | ||
| - |      | + | mlflow.log_metric(' | 
| </ | </ | ||
| Track artefacts (figures, codes, etc. need to be saved before logging) using: | Track artefacts (figures, codes, etc. need to be saved before logging) using: | ||
| < | < | ||
| - |      | + | mlflow.log_artifact('/ | 
| - |     </ | + | </ |