Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dark theme to experiment pane #10380

Merged
merged 20 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b68b435
Further fix validate path on Windows (#10330)
Haxatron Nov 14, 2023
2cd6744
Temporarily pin pydantic in CI due to 2.5.0 breaking changes (#10372)
BenWilson2 Nov 14, 2023
4c38b0c
Update doc requirements and guide to install pandoc (#10348)
B-Step62 Nov 14, 2023
c6539ce
add dark theme to experiment pane
daniellok-db Nov 14, 2023
55b8c4f
fix
daniellok-db Nov 14, 2023
5b28c70
undo
daniellok-db Nov 14, 2023
1b8ac78
remove unnecessary change
daniellok-db Nov 14, 2023
ec7fe8e
Fix the Gateway config validator pre-check for OpenAI to perform inst…
BenWilson2 Nov 14, 2023
bdb5dfe
collapsed button
daniellok-db Nov 14, 2023
23eef04
Fix the problem that async logging has hanging thread (#10374)
chenmoneygithub Nov 14, 2023
3699adf
address comments
daniellok-db Nov 14, 2023
7c6df91
fix
daniellok-db Nov 14, 2023
d668245
Fix regression in downloading single files from models artifact store…
BenWilson2 Nov 14, 2023
148b69a
format docs (#10375)
serena-ruan Nov 14, 2023
5c0b7e2
Add built in metric ndcg_at_k to retriever evaluation (#10284)
liangz1 Nov 14, 2023
373c654
Enable system metrics logging for resuming an existing run (#10312)
chenmoneygithub Nov 14, 2023
8951815
Simplify score_model_on_one_payload (#10381)
prithvikannan Nov 14, 2023
7d96e75
Fix promptlab pyfunc models not working for chat routes (#10346)
daniellok-db Nov 15, 2023
1bed5db
Use `databricks clusters list-zones` to validate credentials (#10394)
chenmoneygithub Nov 15, 2023
db2bcbb
Merge branch 'master' of github.com:mlflow/mlflow into experiment-pane
daniellok-db Nov 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,6 @@ If contributing to MLflow's R APIs, install
[R](https://cloud.r-project.org/) and make sure that you have satisfied
all the [Environment Setup and Python configuration](#environment-setup-and-python-configuration).

For changes to R documentation, also install
[pandoc](https://pandoc.org/installing.html) 2.2.1 or above, verifying
the version of your installation via `pandoc --version`. If using Mac
OSX, note that the homebrew installation of pandoc may be out of date -
you can find newer pandoc versions at
<https://github.com/jgm/pandoc/releases>.

The `mlflow/R/mlflow` directory contains R wrappers for the Projects,
Tracking and Models components. These wrappers depend on the Python
package, so first install the Python package in a conda environment:
Expand Down Expand Up @@ -836,6 +829,16 @@ python setup.py bdist_wheel

First, install dependencies for building docs as described in [Environment Setup and Python configuration](#environment-setup-and-python-configuration).

Building documentation requires [Pandoc](https://pandoc.org/index.html). It should have already been
installed if you used the automated env setup script
([dev-env-setup.sh](https://github.com/mlflow/mlflow/blob/master/dev/dev-env-setup.sh)),
but if you are manually installing dependencies, please follow [the official instruction](https://pandoc.org/installing.html).

Also, check the version of your installation via `pandoc --version` and ensure it is 2.2.1 or above.
If you are using Mac OSX, be aware that the Homebrew installation of Pandoc may be outdated. If you are using Linux,
you should use a deb installer or install from the source, instead of running `apt` / `apt-get` commands. Pandoc package available on official
repositories is an older version and contains several bugs. You can find newer versions at <https://github.com/jgm/pandoc/releases>.

To generate a live preview of Python & other rst documentation, run the
following snippet. Note that R & Java API docs must be regenerated
separately after each change and are not live-updated; see subsequent
Expand Down
79 changes: 70 additions & 9 deletions dev/dev-env-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,45 @@ minor_to_micro() {
esac
}

# Check if brew is installed and install it if it isn't present
# Note: if xcode isn't installed, this will fail.
# $1: name of package that requires brew
check_and_install_brew() {
if [ -z "$(command -v brew)" ]; then
echo "Homebrew is required to install $1 on MacOS. Installing in your home directory."
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
echo "Updating brew..."
brew update
}

# Compare two version numbers
# Usage: version_gt version1 version2
# Returns 0 (true) if version1 > version2, 1 (false) otherwise
version_gt() {
IFS='.' read -ra VER1 <<< "$1"
IFS='.' read -ra VER2 <<< "$2"

# Compare each segment of the version numbers
for (( i=0; i<"${#VER1[@]}"; i++ )); do
# If VER2 is shorter and we haven't found a difference yet, VER1 is greater
if [[ -z ${VER2[i]} ]]; then
return 0
fi

# If some segments are not equal, return their comparison result
if (( ${VER1[i]} > ${VER2[i]} )); then
return 0
elif (( ${VER1[i]} < ${VER2[i]} )); then
return 1
fi
done

# If all common length segments are same, the one with more segments is greater
return $(( ${#VER1[@]} <= ${#VER2[@]} ))
}


# Check if pyenv is installed and offer to install it if not present
pyenv_exist=$(command -v pyenv)

Expand All @@ -115,15 +154,9 @@ if [ -z "$pyenv_exist" ]; then
fi
if [[ $REPLY =~ ^[Yy]$ || -n "$GITHUB_ACTIONS" ]]; then
if [[ "$machine" == mac ]]; then
# Check if brew is installed and install it if it isn't present
# Note: if xcode isn't installed, this will fail.
if [ -z "$(command -v brew)" ]; then
echo "Homebrew is required to install pyenv on MacOS. Installing in your home directory."
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
echo "Updating brew and installing pyenv..."
check_and_install_brew "pyenv"
echo "Installing pyenv..."
echo "Note: this will probably take a considerable amount of time."
brew update
brew install pyenv
brew install openssl readline sqlite3 xz zlib
elif [[ "$machine" == linux ]]; then
Expand Down Expand Up @@ -242,6 +275,34 @@ echo "$(pip freeze)$(tput sgr0)"

command -v docker >/dev/null 2>&1 || echo "$(tput bold; tput setaf 1)A docker installation cannot be found. Please ensure that docker is installed to run all tests locally.$(tput sgr0)"


# check if pandoc with required version is installed and offer to install it if not present
pandoc_version=$(pandoc --version | grep "pandoc" | awk '{print $2}')
if [[ -z "$pandoc_version" ]] || ! version_gt "$pandoc_version" "2.2.1"; then
if [ -z "$GITHUB_ACTIONS" ]; then
read -p "Pandoc version 2.2.1 or above is required to generate documentation. Would you like to install it? $(tput bold)(y/n)$(tput sgr0): " -n 1 -r
echo
fi

if [[ $REPLY =~ ^[Yy]$ || -n "$GITHUB_ACTIONS" ]]; then
echo "Installing Pandoc..."
if [[ "$machine" == mac ]]; then
check_and_install_brew "pandoc"
brew install pandoc
elif [[ "$machine" == linux ]]; then
# install pandoc via deb package as `apt-get` gives too old version
TEMP_DEB=$(mktemp) && \
wget --directory-prefix $TEMP_DEB https://github.com/jgm/pandoc/releases/download/2.16.2/pandoc-2.16.2-1-amd64.deb && \
sudo dpkg --install $(find $TEMP_DEB -name '*.deb') && \
rm -rf $TEMP_DEB
else
echo "Unknown operating system environment: $machine exiting."
exit 1
fi
fi
fi


# Setup git environment configuration for proper signing of commits
git_user=$(git config user.name)
git_email=$(git config user.email)
Expand All @@ -265,4 +326,4 @@ fi
# setup pre-commit hooks
pre-commit install -t pre-commit -t prepare-commit-msg

echo "$(tput setaf 2)Your MLflow development environment can be activated by running: $(tput bold)source $VENV_DIR$(tput sgr0)"
echo "$(tput setaf 2)Your MLflow development environment can be activated by running: $(tput bold)source $VENV_DIR$(tput sgr0)"
10 changes: 5 additions & 5 deletions docs/source/deep-learning/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,27 @@ The officially supported integrations for deep learning libraries in MLflow enco
<div class="logo-grid">
<a href="../models.html#pytorch-pytorch">
<div class="logo-card">
<img src="../_static/images/logos/pytorch-logo.svg" alt="pytorch Logo">
<img src="../_static/images/logos/pytorch-logo.svg" alt="pytorch Logo"/>
</div>
</a>
<a href="../models.html#keras-keras">
<div class="logo-card">
<img src="../_static/images/logos/keras-logo.svg" alt="keras Logo">
<img src="../_static/images/logos/keras-logo.svg" alt="keras Logo"/>
</div>
</a>
<a href="../models.html#tensorflow-tensorflow">
<div class="logo-card">
<img src="../_static/images/logos/TensorFlow-logo.svg" alt="TensorFlow Logo">
<img src="../_static/images/logos/TensorFlow-logo.svg" alt="TensorFlow Logo"/>
</div>
</a>
<a href="../models.html#spacy-spacy">
<div class="logo-card">
<img src="../_static/images/logos/spacy-logo.svg" alt="spaCy Logo">
<img src="../_static/images/logos/spacy-logo.svg" alt="spaCy Logo"/>
</div>
</a>
<a href="../models.html#fastai-fastai">
<div class="logo-card">
<img src="../_static/images/logos/fastai-logo.png" alt="fast.ai Logo">
<img src="../_static/images/logos/fastai-logo.png" alt="fast.ai Logo"/>
</div>
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Next, use the MLflow UI to compare the models that you have produced. In the sam
as the one that contains the ``mlruns`` run:

.. code-section::

.. code-block:: shell

mlflow ui
Expand Down
4 changes: 2 additions & 2 deletions docs/source/getting-started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you would like to get started immediately by interactively running the notebo
.. raw:: html

<a href="https://raw.githubusercontent.com/mlflow/mlflow/master/docs/source/getting-started/intro-quickstart/notebooks/tracking_quickstart.ipynb" class="notebook-download-btn">
<i class="fas fa-download"></i>Download the Notebook</a><br>
<i class="fas fa-download"></i>Download the Notebook</a><br/>

Quickstart elements
^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -76,7 +76,7 @@ If you would like to get started immediately by interactively running the notebo
.. raw:: html

<a href="https://raw.githubusercontent.com/mlflow/mlflow/master/docs/source/getting-started/logging-first-model/notebooks/logging-first-model.ipynb" class="notebook-download-btn">
<i class="fas fa-download"></i>Download the Notebook</a><br>
<i class="fas fa-download"></i>Download the Notebook</a><br/>

Guide sections
^^^^^^^^^^^^^^
Expand Down
5 changes: 5 additions & 0 deletions docs/source/getting-started/intro-quickstart/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Step 1 - Get MLflow
MLflow is available on PyPI. If you don't already have it installed on your system, you can install it with:

.. code-section::

.. code-block:: bash
:name: download-mlflow

Expand All @@ -53,6 +54,7 @@ We're going to start a local MLflow Tracking Server, which we will connect to fo
From a terminal, run:

.. code-section::

.. code-block:: bash
:name: tracking-server-start

Expand All @@ -72,6 +74,7 @@ In this section, we're going to log a model with MLflow. A quick overview of the


.. code-section::

.. code-block:: python
:name: train-model

Expand Down Expand Up @@ -132,6 +135,7 @@ The steps that we will take are:
to ensure that the loggable content (parameters, metrics, artifacts, and the model) are fully materialized prior to logging.

.. code-section::

.. code-block:: python
:name: log-model

Expand Down Expand Up @@ -177,6 +181,7 @@ After logging the model, we can perform inference by:
below.

.. code-section::

.. code-block:: python
:name: load-model

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Step 1: Install MLflow from PyPI
MLflow is conveniently available on PyPI. Installing it is as simple as running a pip command.

.. code-section::

.. code-block:: bash
:name: download-mlflow

Expand All @@ -27,6 +28,7 @@ To begin, you'll need to initiate the MLflow Tracking Server. Remember to keep t
running during the tutorial, as closing it will shut down the server.

.. code-section::

.. code-block:: bash
:name: tracking-server-start

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Importing Dependencies
In order to use the MLflowClient API, the initial step involves importing the necessary modules.

.. code-section::

.. code-block:: python
:name: imports
:emphasize-lines: 1
Expand All @@ -43,6 +44,7 @@ assigned the server when we started it. The two components that we submitted as
``host`` and the ``port``. Combined, these form the ``tracking_uri`` argument that we will specify to start an instance of the client.

.. code-section::

.. code-block:: python
:name: client

Expand Down Expand Up @@ -70,6 +72,7 @@ The first thing that we're going to do is to view the metadata associated with t
use of the :py:func:`mlflow.client.MlflowClient.search_experiments` API. Let's issue a search query to see what the results are.

.. code-section::

.. code-block:: python

all_experiments = client.search_experiments()
Expand All @@ -91,6 +94,7 @@ To get familiar with accessing elements from returned collections from MLflow AP
query and extract these attributes into a dict.

.. code-section::

.. code-block:: python

default_experiment = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Creating the Apples Experiment with Meaningful tags
---------------------------------------------------

.. code-section::

.. code-block:: python

# Provide an Experiment description that will appear in the UI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ tags, note the particular syntax used. The custom tag names are wrapped with bac
condition is wrapped in single quotes.

.. code-section::

.. code-block:: python

# Use search_experiments() to search on the project_name tag key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ We can introduce this correlation by crafting a relationship between our feature
The random elements of some of the factors will handle the unexplained variance portion.

.. code-section::

.. code-block:: python

import pandas as pd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ using MLflow to tracking a training iteration.
To start with, we will need to import our required modules.

.. code-section::

.. code-block:: python

import mlflow
Expand All @@ -94,6 +95,7 @@ In order to use the ``fluent`` API, we'll need to set the global reference to th
address. We do this via the following command:

.. code-section::

.. code-block:: python

mlflow.set_tracking_uri("http://127.0.0.1:8080")
Expand All @@ -104,6 +106,7 @@ to log runs to. The parent-child relationship of Experiments to Runs and its uti
clear once we start iterating over some ideas and need to compare the results of our tests.

.. code-section::

.. code-block:: python

# Sets the current active experiment to the "Apple_Models" experiment and
Expand All @@ -123,6 +126,7 @@ Firstly, let's look at what we're going to be running. Following the code displa
an annotated version of the code.

.. code-section::

.. code-block:: python

# Split the data into features and target and drop irrelevant date field and target field
Expand Down
1 change: 1 addition & 0 deletions docs/source/getting-started/quickstart-1/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ In addition, or if you are using a library for which ``autolog`` is not yet supp
This example demonstrates the use of these functions:

.. code-section::

.. code-block:: python

import os
Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting-started/quickstart-2/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Choose **Chart view**. Choose the **Parallel coordinates** graph and configure i
class="align-center"
id="chart-view"
alt="Screenshot of MLflow tracking UI parallel coordinates graph showing runs"
>
/>

The red graphs on this graph are runs that fared poorly. The lowest one is a baseline run with both **lr** and **momentum** set to 0.0. That baseline run has an RMSE of ~0.89. The other red lines show that high **momentum** can also lead to poor results with this problem and architecture.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/llms/custom-pyfunc-for-llms/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Explore the Tutorial

.. raw:: html

<a href="notebooks/index.html" class="download-btn">View the Custom Pyfunc for LLMs Tutorial</a><br>
<a href="notebooks/index.html" class="download-btn">View the Custom Pyfunc for LLMs Tutorial</a><br/>

.. toctree::
:maxdepth: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ If you'd like to run a copy of the notebooks locally in your environment, you ca

.. raw:: html

<a href="https://raw.githubusercontent.com/mlflow/mlflow/master/docs/source/llms/custom-pyfunc-for-llms/notebooks/custom-pyfunc-advanced-llm.ipynb" class="notebook-download-btn">Download the LLM Custom Pyfunc notebook</a><br>
<a href="https://raw.githubusercontent.com/mlflow/mlflow/master/docs/source/llms/custom-pyfunc-for-llms/notebooks/custom-pyfunc-advanced-llm.ipynb" class="notebook-download-btn">Download the LLM Custom Pyfunc notebook</a><br/>

.. note::
To execute the notebooks, ensure you either have a local MLflow Tracking Server running or adjust the ``mlflow.set_tracking_uri()`` to point to an active MLflow Tracking Server instance.
Expand Down
Loading
Loading