mlflow.js is an open-source npm library designed for JavaScript developers who want to integrate with MLflow, providing tools and functionalities for managing machine learning lifecycle.
Visit the official mlflow.js site for more info!
Visit our LinkedIn page below:
mlflow.js covers all REST API endpoints under MLflow's Tracking Server and Model Registry. Official documentation for MLflow.js can be found here. Moreover, high-level abstraction workflows have been developed to facilitate developers' work processes.
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, ogging mettrics, params,tags, and the model, and finishing the run
- experimentSummary - Returns an array of all the passed-in experiment's runs, sorted accoroding 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 frist 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 foro tthat latest version
Ensure MLflow is installed on your system:
pip install mlflow
Note: MLflow is compatible with MacOS. If you encountner issues with the default system Python, consider installing Python 3 via the Homebrew package manger using brew install python
. In this case, installing MLflow is now pip3 install mlflow
.
To start the MLflow tracking server locally, use the following command:
mlflow ui --port 5000
This will launch the MLflow UI on your local machine at http://localhost:5000
.
To use the MLflow.js library, navigate to your project directory and install it via npm:
npm install mlflow-js
Here is an example of how to use the MLflow.js library to create an experiment:
import Mlflow from 'mlflow-js';
// Initialize the MLflow client
const mlflow = new Mlflow('http://127.0.0.1:5000');
// Get the experiment client
const experimentClient = mlflow.getExperimentClient();
// Create a new experiment
async function createExperiment(){
try {
await experimentClient.createExperiment('My Experiment');
console.log('Experiment created successfully');
} catch (error) {
console.error('Error creating experiment:', error);
}
}
createExperiment();
Official documentation for MLflow.js can be found here.
We welcome contributions to mlflow.js! Please see our Contributing Guide for more details on how to get started.
Name | GitHub | |
---|---|---|
Kyler Chiago | ||
Austin Fraser | ||
Stephany Ho | ||
Winston Ludlam | ||
Yiqun Zheng |