Code Monkey home page Code Monkey logo

recipes-examples's Introduction

MLflow Recipes Examples

This repository contains example projects for the MLflow Recipes (previously known as MLflow Pipelines). To learn about specific recipe, follow the installation instructions below to install all necessary packages, then checkout the relevant example projects listed here.

Note: This example repo is intended for first-time MLflow Recipes users to learn its fundamental concepts and workflows. For users already familiar with MLflow Recipes, find a template repository to solve a specific ML problem. For example, for regression problem, use recipes-regression-template instead.

Note: MLflow Recipes is an experimental feature in MLflow. If you observe any issues, please report them here. For suggestions on improvements, please file a discussion topic here. Your contribution to MLflow Recipes is greatly appreciated by the community!

Example Projects

Installation instructions

To use MLflow Recipes in this example repository, simply install the packages listed in the requirements.txt file. Note that Python 3.8 or above is required.

pip install -r requirements.txt

You may need to install additional libraries for extra features:

Log to the designated MLflow Experiment

To log recipe runs to a particular MLflow experiment:

  1. Open profiles/databricks.yaml or profiles/local.yaml, depending on your environment.
  2. Edit (and uncomment, if necessary) the experiment section, specifying the name of the desired experiment for logging.

Development Environment -- Databricks

Sync this repository with Databricks Repos and run the notebooks/databricks notebook on a Databricks Cluster running version 11.0 or greater of the Databricks Runtime or the Databricks Runtime for Machine Learning with workspace files support enabled.

Note: When making changes to recipes on Databricks, it is recommended that you edit files on your local machine and use dbx to sync them to Databricks Repos, as demonstrated here

Note: data profiles display in step cards are not visually compatible with dark theme. Please avoid using the dark theme if possible.

Accessing MLflow recipe Runs

You can find MLflow Experiments and MLflow Runs created by the recipe on the Databricks ML Experiments page.

Development Environment -- Local machine

Jupyter

  1. Launch the Jupyter Notebook environment via the jupyter notebook command.
  2. Open and run the notebooks/jupyter.ipynb notebook in the Jupyter environment.

Note: data profiles display in step cards are not visually compatible with dark theme. Please avoid using the dark theme if possible.

Command-Line Interface (CLI)

First, enter the corresponding example root directory and set the profile via environment variable. For example, for the regression example project,

cd regression
export MLFLOW_RECIPES_PROFILE=local

Then, try running the following MLflow Recipes CLI commands to get started. Note that the --step argument is optional. Recipe commands without a --step specified act on the entire recipe instead.

Available step names are: ingest, split, transform, train, evaluate and register.

  • Display the help message:
mlflow recipes --help
  • Run a recipe step or the entire recipe:
mlflow recipes run --step step_name
  • Inspect a step card or the recipe dependency graph:
mlflow recipes inspect --step step_name
  • Clean a step cache or all step caches:
mlflow recipes clean --step step_name

Accessing MLflow Recipe Runs

To view MLflow Experiments and MLflow Runs created by the recipe:

  1. Enter the example root directory, for example: cd regression

  2. Start the MLflow UI

mlflow ui \
   --backend-store-uri sqlite:///metadata/mlflow/mlruns.db \
   --default-artifact-root ./metadata/mlflow/mlartifacts \
   --host localhost

recipes-examples's People

Contributors

sunishsheth2009 avatar jinzhang21 avatar prithvikannan avatar harupy avatar hubertzub-db avatar marcusrb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.