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.
Ensure MLflow is installed on your system:
pip install mlflow
Note: MLflow is compatible with MacOS. If you encoutner 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 instatll 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 at ...
![]() | ![]() | ![]() | ![]() | ![]() |
---|---|---|---|---|
Kyler Chiago GitHub | Austin Fraser GitHub | Stephany Ho GitHub | Winston Ludlam GitHub | Yiqun Zheng GitHub |
OR