GithubHelp home page GithubHelp logo

mlflow's Introduction

mlflow

Hyperparameter search

mlflow run . --env-manager=local -P file_name='hyperparameter_search.py'

From Github

mlflow run https://github.com/rohan2810/mlflow.git --env-manager=local -P file_name='hyperparameter_search.py'

model training

use alpha and l1_ratio from hyperparameter search

mlflow run . --env-manager=local -P file_name='train.py' -P alpha=0.05 -P l1_ratio=0.1

From Github

mlflow run https://github.com/rohan2810/mlflow.git --env-manager=local -P file_name='train.py' -P alpha=0.05 -P l1_ratio=0.1

model testing

mlflow run . --env-manager=local -P file_name='test.py' -P model_name='Model A' -P model_version=1

From Github

mlflow run https://github.com/rohan2810/mlflow.git --env-manager=local -P file_name='test.py' -P model_name='Model A' -P model_version=1

Notes:

MLFlow:

experiment tracking, project management, model management/registry

Installation:

mlflow: pip3 install mlflow

UI (localhost:5000): run mlflow ui on a seperate terminal (same project directory)

Experiment tracking:

After data pre-processing step/before running the model(training, testing, hyperparamter), add mlflow.set_tracking_uri("http://127.0.0.1:5000") to log everything to localhost.

Logging parameters: mlflow.log_param("var", var)

Logging metrics: mlflow.log_metric("var", var)

Logging artifacts: mlflow..log_model

localhost:5000 lists individual runs with params, metrics, and artifacts and models

Project management:

Can package MLflow projects for reusability

Conda.yml file to list dependencies

MlFlow file for parameters and command

Eg. To find best hyperparameters:

  1. From local project: mlflow run . --env-manager=local -P file_name='hyperparameter_search.py'

    '--env-manager=local' forces to use local env instead of creating a new conda env

  2. From github: mlflow run https://github.com/rohan2810/mlflow.git --env-manager=local -P file_name='hyperparameter_search.py'

Model Registry:

Can register models and reuse using APIs and CLI

Versions, Stage (None, staging, production, archived)

Models can be loaded using model = mlflow.sklearn.load_model(model_uri=f"models:/{model_name}/{model_version}")

mlflow's People

Contributors

rohan2810 avatar

Watchers

 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.