<commit_before>.. _tutorial:

Tutorial
========

This tutorial showcases how you can use MLflow end-to-end to:

- Train a linear regression model
- Package the code that trains the model in a reusable and reproducible model format
- Deploy the model into a simple HTTP server that will enable you to score predictions

This tutorial uses a dataset to predict the quality of wine based on quantitative features
like the wine's "fixed acidity", "pH", "residual sugar", and so on. The dataset
is from UCI's `machine learning repository <http://archive.ics.uci.edu/ml/datasets/Wine+Quality>`_.
[1]_

.. contents:: Table of Contents
  :local:
  :depth: 1

What You'll Need
----------------

To run this tutorial, you'll need to:

.. plain-section::

    .. container:: python

       - Install MLflow and scikit-learn. There are two options for installing these dependencies:

           1. Install MLflow with extra dependencies, including scikit-learn
              (via ``pip install mlflow[extras]``)
           2. Install MLflow (via ``pip install mlflow``) and install scikit-learn separately
              (via ``pip install scikit-learn``)

       - Install `conda <https://conda.io/projects/conda/en/latest/user-guide/install/index.html>`_
       - Clone (download) the MLflow repository via ``git clone https://github.com/mlflow/mlflow``
       - ``cd`` into the ``examples`` directory within your clone of MLflow - we'll use this working
         directory for running the tutorial. We avoid running directly from our clone of MLflow as doing
         so would cause the tutorial to use MLflow from source, rather than your PyPI installation of
         MLflow.

    .. container:: R

       - Install `conda <https://conda.io/projects/conda/en/latest/user-guide/install/index.html>`_
       - Install the MLflow package (via ``install.packages("mlflow")``)
       - Install MLflow (via ``mlflow::mlflow_install()``)
       - Clone (download) the MLflow repository via ``git clone https://github.com/mlflow/mlflow``
       - ``setwd()`` into the ``examples`` directory within your clone of MLflow - we'll use this
         working directory for running the tutorial. We avoid running directly from our clone of
         MLflow as doing so would cause the tutorial to use MLflow from source, rather than your
         PyPI installation of MLflow.<commit_msg>Update tutorial.rst (#2002)<commit_after>.. _tutorial:

Tutorial
========

This tutorial showcases how you can use MLflow end-to-end to:

- Train a linear regression model
- Package the code that trains the model in a reusable and reproducible model format
- Deploy the model into a simple HTTP server that will enable you to score predictions

This tutorial uses a dataset to predict the quality of wine based on quantitative features
like the wine's "fixed acidity", "pH", "residual sugar", and so on. The dataset
is from UCI's `machine learning repository <http://archive.ics.uci.edu/ml/datasets/Wine+Quality>`_.
[1]_

.. contents:: Table of Contents
  :local:
  :depth: 1

What You'll Need
----------------

To run this tutorial, you'll need to:

.. plain-section::

    .. container:: python

       - Install MLflow and scikit-learn. There are two options for installing these dependencies:

           1. Install MLflow with extra dependencies, including scikit-learn
              (via ``pip install mlflow[extras]``)
           2. Install MLflow (via ``pip install mlflow``) and install scikit-learn separately
              (via ``pip install scikit-learn``)

       - Install `conda <https://conda.io/projects/conda/en/latest/user-guide/install/index.html>`_
       - Clone (download) the MLflow repository via ``git clone https://github.com/mlflow/mlflow``
       - ``cd`` into the ``examples`` directory within your clone of MLflow - we'll use this working
         directory for running the tutorial. We avoid running directly from our clone of MLflow as doing
         so would cause the tutorial to use MLflow from source, rather than your PyPI installation of
         MLflow.

    .. container:: R

       - Install `conda <https://conda.io/projects/conda/en/latest/user-guide/install/index.html>`_
       - Install the MLflow package (via ``install.packages("mlflow")``)
       - Install MLflow (via ``mlflow::install_mlflow()``)
       - Clone (download) the MLflow repository via ``git clone https://github.com/mlflow/mlflow``
       - ``setwd()`` into the ``examples`` directory within your clone of MLflow - we'll use this
         working directory for running the tutorial. We avoid running directly from our clone of
         MLflow as doing so would cause the tutorial to use MLflow from source, rather than your
         PyPI installation of MLflow.
{'fraction_non_alphanumeric': 0.1, 'fraction_numerical': 0.002531645569620253, 'mean_word_length': 3.052136752136752, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6853263', 'n_tokens_mistral': 1317, 'n_tokens_neox': 1236, 'n_words': 545}