- Notifications
You must be signed in to change notification settings - Fork7
A JavaScript client library for MLflow that streamlines machine learning lifecycle management in web environments.
License
open-source-labs/mlflow-js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
MLflow.js is an open-source JavaScript library that helps developers track machine learning experiments and manage models with MLflow, providing functionalities for machine learning lifecycle in JavaScript/TypeScript environments.
MLflow.js covers all REST API endpoints under MLflow's Tracking Server and Model Registry. Moreover, high-level abstractions have been developed to facilitate developers' common ML workflows. It provides some key advantages:
- Native JavaScript Integration: Seamlessly integrate MLflow capabilities within JavaScript codebases
- Type Safety: Built with TypeScript for enhanced developer experience and code reliability
- Modular Architecture: Designed with object-oriented structure that mirrors MLflow's concepts while being extensible and maintainable
- Client-side ML Compatibility: Complements popular JavaScript libraries like TensorFlow.js, enabling ML deployment directly in the browser or client side
Ensure MLflow is installed on your system:
pip install mlflow
For MacOS users, we recommend creating and activating a Python virtual environment to avoid common installation issues and keep dependencies isolated:
python3 -m venv mlflow-venvsource mlflow-venv/bin/activatepip install mlflowRemember to activate your virtual environment (source mlflow-venv/bin/activate) each time you open a new terminal before running MLflow commands.
After activating the virtual environment, start the MLflow tracking server locally, use the following command:
mlflow ui --port 5001
This will launch the MLflow UI on your local machine athttp://localhost:5001.
InstallDocker Desktop.
To start the MLflow tracking server locally, use the following commands:
docker pull ghcr.io/mlflow/mlflowdocker run -p 5001:5001 ghcr.io/mlflow/mlflow:latest mlflow server --host 0.0.0.0 --port 5001
This will launch the MLflow UI on your local machine athttp://localhost:5001.
For development environment setup instructions, please refer to ourContributing Guide.
To use themlflow.js library, navigate to your project directory and install it via npm:
npm install mlflow-js
Here is an example of how to use themlflow.js library to create an experiment:
importMlflowfrom'mlflow-js';// Initialize the MLflow clientconstmlflow=newMlflow(process.env.MLFLOW_TRACKING_URI);// Create a new experimentasyncfunctioncreateExperiment(){awaitmlflow.createExperiment('My Experiment');console.log('Experiment created successfully');}createExperiment();
- Example Repository - Practical examples demonstratingMLflow.js's functionality
- Quick Tutorials - Video walkthrough of the example code with MLflow UI
- Read our Medium Article - Overview on why we builtMLflow.js and how it enhances ML workflows in JavaScript environments
Official documentation forMLflow.js can be foundhere.
Experiment Manager
- runExistingExperiment - Full workflow of creating, naming, and starting a run under an existing experiment, logging metrics, params, tags, and the model, and finishing the run
- runNewExperiment - Full workflow of creating, naming, and starting a run under a new experiment, logging metrics, params, tags, and the model, and finishing the run
- experimentSummary - Returns an array of all the passed-in experiment's runs, sorted according to the passed-in metric
Run Manager
- cleanupRuns - Deletes runs that do not meet certain criteria and return an object of deleted runs and details
- copyRun - Copies a run from one experiment to another (without artifacts and models)
Model Manager
- createRegisteredModelWithVersion - Creates a new registered model and the first version of that model
- updateRegisteredModelDescriptionAndTag - Updates a registered model's description and tags
- updateAllLatestModelVersion - Updates the latest version of the specified registered model's description, adds a new alias, and tag key/value for the latest version
- setLatestModelVersionTag - Adds a new tag key/value for the latest version of the specified registered model
- setLatestModelVersionAlias - Adds an alias for the latest version of the specified registered model
- updateLatestModelVersion - Updates the description of the latest version of a registered model
- updateAllModelVersion - Updates the specified version of the specified registered model's description and adds a new alias and tag key/value for that specified version
- deleteLatestModelVersion - Deletes the latest version of the specified registered model
- createModelFromRunWithBestMetric - Creates a new model with the specified model name from the run with the best specified metric
We welcome contributions toMLflow.js! See ourContributing Guide for more details on how to get started.
Note:MLflow.js is community-based and maintained by a goodwill.
| Name | GitHub | |
|---|---|---|
| Yiqun Zheng | ||
| Kyler Chiago | ||
| Austin Fraser | ||
| Stephany Ho | ||
| Winston Ludlam |
About
A JavaScript client library for MLflow that streamlines machine learning lifecycle management in web environments.
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.
