Coder Social home page Coder Social logo

ml_model_utils's Introduction

ML Model Utils

Introduction

Machine Learning model utils functions.

Prerequisites

To install the dependencies listed in requirements/base.txt, you can use:

$ pip install -r requirements/base.txt

User Guide

How to Install

Stable release

To install ML Model Utils, run this command in your terminal:

$ pip install ml_model_utils

This is the preferred method to install ML Model Utils, as it will always install the most recent stable release.

From sources

The sources for ML Model Utils can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone https://github.com/zhiwei2017/ml_model_utils.git

Once you have a copy of the source, you can install it with:

$ python setup.py install

or

$ pip install .

How to Use

Upload Model to mlflow

Here is an example for using ml_model_utils to upload model and its metrics to mlflow:

from ml_model_utils.mlflow import upload_model
from ml_model_utils.constants import MlflowModelStage

upload_model("https://mlflow.dummy.com", "dummy-model", "dummy_model",
             "classifier", model,
             dict(precision=0.91, recall=0.90, f1_score=0.905, support=300),
             MlflowModelStage.STAGING, MlflowModelStage.ARCHIVED)

Get files from S3 path

Here is an example for gettting files from a given S3 path:

from ml_model_utils.files import get_s3_files

get_s3_files("s3://dummy_bucket/dummy/path")

For more usages, please check the section Source from our documentation.

Maintainers

ml_model_utils's People

Contributors

lan314 avatar zhiwei2017 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.