Skip to content

Commit

Permalink
MLFlow Notebook Integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ColmBhandal authored Sep 15, 2023
1 parent 0efa301 commit 5ebc1aa
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ installable
Jira
JSON
Juju
Jupyter
JupyterLab
Kubeflow
Kubernetes
lifecycle
Expand All @@ -43,5 +45,6 @@ RTD
subdirectories
subtree
UI
URI
TensorBoard
VM
1 change: 1 addition & 0 deletions docs/how-to/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Integration

integrate-cos
integrate-ml-ckf-ck8s
integrate-notebook

Upgrading
---------
Expand Down
66 changes: 66 additions & 0 deletions docs/how-to/integrate-notebook.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Integrate MLflow with Jupyter Notebooks
=======================================

To run Jupyter Notebooks in Charmed MLflow, JupyterLab must be deployed and a number of configurations made.

Prerequisites
-------------

- You are deploying Jupyter Notebook and MLflow on a workstation running Ubuntu 20.04 (focal) or later.
- Your workstation has at least 4 cores, 32GB RAM, and 32GB of disk space available.
- Your workstation is connected to the internet for downloading the required snaps and charms.

Deploy MLflow
-------------

Follow the steps in this tutorial to deploy MLflow on your VM: :doc:`../tutorial/mlflow`. Confirm that you can now access the MLflow UI on ``http://localhost:31380.``

Deploy JupyterLab
-----------------

Install JupyterLab:

.. code-block:: bash
pip install jupyterlab
Run JupyterLab:

.. code-block:: bash
jupyter lab
Access MLflow UI
----------------

Access the MLflow UI:

.. code-block:: bash
mlflow ui
Configure MinIO and MLflow
--------------------------

Before you can run your first experiment, there are a couple of things to adjust — the MLflow URI and the MinIO URI. To do this:

#. Open a new terminal window connected to the instance you have been using.

#. Enter the following command to check the status:

.. code-block:: bash
juju status
#. Now, go back to the Notebook and update the MLflow URL and MinIO URL as needed.

#. Once those are updated, there is one last step you need to do. Return to the terminal and run:

.. code-block:: bash
juju run-action mlflow-server/0 get-minio-credentials — wait
This will display the secret-key and secret-access-key. Be sure to update them in the Notebook as well.

Now, you are ready to run your first experiment. After finalising the run, you can go to the MLflow UI and view the experiment results.

0 comments on commit 5ebc1aa

Please sign in to comment.