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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

format docs #10375

Merged
merged 1 commit into from Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/source/deep-learning/index.rst
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
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
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
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
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
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
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
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
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
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
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
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
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
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
4 changes: 4 additions & 0 deletions docs/source/llms/gateway/guides/step1-create-gateway.rst
Expand Up @@ -8,6 +8,7 @@ dependencies, including ``uvicorn`` and ``fastapi``. Note that direct dependenci
unnecessary, as all supported providers are abstracted from the developer.

.. code-section::

.. code-block:: bash
:name: install-gateway

Expand All @@ -22,6 +23,7 @@ of leaking the token in code. The AI Gateway, when started, will read the value
variable without any additional action required.

.. code-section::

.. code-block:: bash
:name: token

Expand All @@ -37,6 +39,7 @@ service restart is not required for changes to take effect and can instead be do
configuration file that is defined at server start, permitting dynamic route creation without downtime of the service.

.. code-section::

.. code-block:: yaml
:name: configure-gateway

Expand Down Expand Up @@ -85,6 +88,7 @@ the URL: ``http://localhost:5000``. To modify these default settings, use the
``mlflow gateway --help`` command to view additional configuration options.

.. code-section::

.. code-block:: bash
:name: start-gateway

Expand Down
4 changes: 4 additions & 0 deletions docs/source/llms/gateway/guides/step2-query-gateway.rst
Expand Up @@ -22,6 +22,7 @@ Setup
First, import the necessary functions and define the gateway URI.

.. code-section::

.. code-block:: python
:name: setup
Expand All @@ -39,6 +40,7 @@ which is the string the Language Model (LLM) will respond to. The gateway also a
various other parameters. For detailed information, please refer to the documentation.

.. code-section::

.. code-block:: python
:name: completions
Expand Down Expand Up @@ -72,6 +74,7 @@ takes a list of dictionaries formatted as follows:
For further details, please consult the documentation.

.. code-section::

.. code-block:: python
:name: chat
Expand Down Expand Up @@ -103,6 +106,7 @@ string or a list of strings. The gateway then processes these strings and return
respective numerical vectors. Let's proceed with an example...

.. code-section::

.. code-block:: python
:name: embeddings
Expand Down
2 changes: 1 addition & 1 deletion docs/source/llms/gateway/index.rst
Expand Up @@ -42,7 +42,7 @@ as fast as possible, the guides below will be your best first stop.

.. raw:: html

<a href="guides/index.html" class="download-btn">View the AI Gateway Getting Started Guide</a><br>
<a href="guides/index.html" class="download-btn">View the AI Gateway Getting Started Guide</a><br/>

.. _gateway-quickstart:

Expand Down
26 changes: 13 additions & 13 deletions docs/source/llms/index.rst
Expand Up @@ -67,47 +67,47 @@ configuration and management of your LLM serving needs, select the provider that
<div class="logo-grid">
<a href="gateway/index.html#providers">
<div class="logo-card">
<img src="../_static/images/logos/openai-logo.png" alt="OpenAI Logo">
<img src="../_static/images/logos/openai-logo.png" alt="OpenAI Logo"/>
</div>
</a>
<a href="gateway/index.html#providers">
<div class="logo-card">
<img src="../_static/images/logos/mosaicml-logo.svg" alt="MosaicML Logo">
<img src="../_static/images/logos/mosaicml-logo.svg" alt="MosaicML Logo"/>
</div>
</a>
<a href="gateway/index.html#providers">
<div class="logo-card">
<img src="../_static/images/logos/anthropic-logo.svg" alt="Anthropic Logo">
<img src="../_static/images/logos/anthropic-logo.svg" alt="Anthropic Logo"/>
</div>
</a>
<a href="gateway/index.html#providers">
<div class="logo-card">
<img src="../_static/images/logos/cohere-logo.png" alt="Cohere Logo">
<img src="../_static/images/logos/cohere-logo.png" alt="Cohere Logo"/>
</div>
</a>
<a href="gateway/index.html#providers">
<div class="logo-card">
<img src="../_static/images/logos/mlflow-logo.svg" alt="MLflow Logo">
<img src="../_static/images/logos/mlflow-logo.svg" alt="MLflow Logo"/>
</div>
</a>
<a href="gateway/index.html#providers">
<div class="logo-card">
<img src="../_static/images/logos/aws-logo.svg" alt="AWS Logo" style="max-height: 3rem;">
<img src="../_static/images/logos/aws-logo.svg" alt="AWS Logo" style="max-height: 3rem;"/>
</div>
</a>
<a href="gateway/index.html#providers">
<div class="logo-card">
<img src="../_static/images/logos/PaLM-logo.png" alt="PaLM Logo">
<img src="../_static/images/logos/PaLM-logo.png" alt="PaLM Logo"/>
</div>
</a>
<a href="gateway/index.html#providers">
<div class="logo-card">
<img src="../_static/images/logos/ai21labs-logo.svg" alt="ai21Labs Logo">
<img src="../_static/images/logos/ai21labs-logo.svg" alt="ai21Labs Logo"/>
</div>
</a>
<a href="gateway/index.html#providers">
<div class="logo-card">
<img src="../_static/images/logos/huggingface-logo.svg" alt="Hugging Face Logo">
<img src="../_static/images/logos/huggingface-logo.svg" alt="Hugging Face Logo"/>
</div>
</a>
</div>
Expand Down Expand Up @@ -246,25 +246,25 @@ Select the integration below to read the documentation on how to leverage MLflow

<a href="../models.html#transformers-transformers-experimental">
<div class="logo-card">
<img src="../_static/images/logos/huggingface-logo.svg" alt="HuggingFace Logo">
<img src="../_static/images/logos/huggingface-logo.svg" alt="HuggingFace Logo"/>
</div>
</a>

<a href="../models.html#sentencetransformers-sentence-transformers-experimental">
<div class="logo-card">
<img src="../_static/images/logos/sentence-transformers-logo.png" alt="Sentence Transformers Logo">
<img src="../_static/images/logos/sentence-transformers-logo.png" alt="Sentence Transformers Logo"/>
</div>
</a>

<a href="../models.html#langchain-langchain-experimental">
<div class="logo-card">
<img src="../_static/images/logos/langchain-logo.png" alt="LangChain Logo">
<img src="../_static/images/logos/langchain-logo.png" alt="LangChain Logo"/>
</div>
</a>

<a href="../models.html#openai-openai-experimental">
<div class="logo-card">
<img src="../_static/images/logos/openai-logo.png" alt="OpenAI Logo">
<img src="../_static/images/logos/openai-logo.png" alt="OpenAI Logo"/>
</div>
</a>
</div>
Expand Down