Skip to content

changhsinlee/mlflow-flavor-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MLFlow custom flavor examples

Example on how to create a custom flavor for MLFlow

Running the code

Requirements

  • Python version >=3.9 is required.

Create environment

After cloning the repository, create a virtual environment in the repository with

python3 -m venv .venv

Then activate the virtual environment and install the repository as a package

# For Macs or Linux
source .venv/bin/activate

# For Windows
.venv\Scripts\activate

Installing dependencies

Once the virtual environment is activated, run

# Navigate to where setup.py is
pip install -e .

Start MLFlow server

Once the virtual environment is activated, run

mlflow ui

and it will start a local MLFlow server at the default URI: http://127.0.0.1:5000 with artifacts saved to ./mlruns

Note: most teams run MLFlow as a remote server. I'm not going to bother with setting one up here. You will not be able to log models to Model Registry and test the full log_model(), load_model() workflow with this setup. For more information, please see the official MLFlow doc.

Running tests

To run the tests, run

pytest

If you want to ignore the deprecation warnings, run

pytest -W ignore::DeprecationWarning

About

Example of how to create a custom MLFlow flavor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages