|
| 1 | +<div style="text-align: center"> |
| 2 | +<img src="mlflow-site/public/assets/mlflow-js-logo-whitebg.png" width=600px;"/></div> |
1 | 3 |
|
| 4 | +<br> |
| 5 | + |
| 6 | +## About |
| 7 | + |
| 8 | +[](/LICENSE) |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +[](/CONTRIBUTING.md) |
| 13 | + |
| 14 | +<i>mlflow.js</i> 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. |
| 15 | + |
| 16 | +<a href="">Visit the official mlflow.js site for more info!</a> |
| 17 | + |
| 18 | +Visit our LinkedIn page below: |
| 19 | + |
| 20 | +[](https://www.linkedin.com/company/mlflowjs/) |
| 21 | + |
| 22 | +<br> |
| 23 | + |
| 24 | +## Features |
| 25 | + |
| 26 | +<i>mlflow.js</i> covers all REST API endpoints under MLflow's Tracking Server and Model Registry. Official documentation for MLflow.js can be found <a href="">here</a>. Moreover, high-level abstraction workflows have been developed to facilitate developers' work processes. |
| 27 | + |
| 28 | +### High-Level Abstraction Workflows |
| 29 | + |
| 30 | +**Experiment Manager** |
| 31 | + |
| 32 | +- 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 |
| 33 | +- 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 |
| 34 | +- experimentSummary - Returns an array of all the passed-in experiment's runs, sorted accoroding to the passed-in metric |
| 35 | + |
| 36 | +**Run Manager** |
| 37 | + |
| 38 | +- cleanupRuns - Deletes runs that do not meet certain criteria and return an object of deleted runs and details |
| 39 | +- copyRun - Copies a run from one experiment to another (without artifacts and models) |
| 40 | + |
| 41 | +**Model Manager** |
| 42 | + |
| 43 | +- createRegisteredModelWithVersion - Creates a new registered model and the frist version of that model |
| 44 | +- updateRegisteredModelDescriptionAndTag - Updates a registered model's description and tags |
| 45 | +- updateAllLatestModelVersion - Updates the latest version of the specified registered model's description, adds a new alias, and tag key/value foro tthat latest version |
| 46 | + |
| 47 | +<br> |
| 48 | + |
| 49 | +## Built with |
| 50 | + |
| 51 | +[](https://www.typescriptlang.org/) |
| 52 | +[](https://www.javascript.com/) |
| 53 | +[](https://react.dev/) |
| 54 | +[](https://nextjs.org/) |
| 55 | +[](https://tailwindcss.com/) |
| 56 | +[](https://eslint.org/) |
| 57 | +[](https://nodejs.org/en/) |
| 58 | +[](https://jestjs.io/) |
| 59 | +[](https://github.com/features/actions) |
| 60 | +[](https://www.docker.com/) |
| 61 | +[](https://www.npmjs.com/) |
| 62 | +[](https://vercel.com/) |
| 63 | + |
| 64 | +<br> |
| 65 | + |
| 66 | +## Prerequisites |
| 67 | + |
| 68 | +### Set Up MLflow UI |
| 69 | + |
| 70 | +Ensure MLflow is installed on your system: |
| 71 | + |
| 72 | +```bash |
| 73 | +pip install mlflow |
| 74 | +``` |
| 75 | + |
| 76 | +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`. |
| 77 | + |
| 78 | +### Start the MLflow Tracking Server |
| 79 | + |
| 80 | +To start the MLflow tracking server locally, use the following command: |
| 81 | + |
| 82 | +```bash |
| 83 | +mlflow ui --port 5000 |
| 84 | +``` |
| 85 | + |
| 86 | +This will launch the MLflow UI on your local machine at `http://localhost:5000`. |
| 87 | + |
| 88 | +<br> |
| 89 | + |
| 90 | +## Quickstart |
| 91 | + |
| 92 | +### Install MLflow.js Library |
| 93 | + |
| 94 | +To use the MLflow.js library, navigate to your project directory and install it via npm: |
| 95 | + |
| 96 | +```bash |
| 97 | +npm install mlflow-js |
| 98 | +``` |
| 99 | + |
| 100 | +### Usage Example |
| 101 | + |
| 102 | +Here is an example of how to use the MLflow.js library to create an experiment: |
| 103 | + |
| 104 | +```JavaScript |
| 105 | +import Mlflow from 'mlflow-js'; |
| 106 | + |
| 107 | +// Initialize the MLflow client |
| 108 | +const mlflow = new Mlflow('http://127.0.0.1:5000'); |
| 109 | + |
| 110 | +// Get the experiment client |
| 111 | +const experimentClient = mlflow.getExperimentClient(); |
| 112 | + |
| 113 | +// Create a new experiment |
| 114 | +async function createExperiment(){ |
| 115 | + try { |
| 116 | + await experimentClient.createExperiment('My Experiment'); |
| 117 | + console.log('Experiment created successfully'); |
| 118 | + } catch (error) { |
| 119 | + console.error('Error creating experiment:', error); |
| 120 | + } |
| 121 | +} |
| 122 | + |
| 123 | +createExperiment(); |
| 124 | +``` |
| 125 | + |
| 126 | +<br> |
| 127 | + |
| 128 | +## Documentation |
| 129 | + |
| 130 | +Official documentation for MLflow.js can be found <a href="">here</a>. |
| 131 | + |
| 132 | +<br> |
| 133 | + |
| 134 | +## Contributing |
| 135 | + |
| 136 | +We welcome contributions to mlflow.js! Please see our [Contributing Guide](CONTRIBUTING.md) for more details on how to get started. |
| 137 | + |
| 138 | +<br> |
| 139 | + |
| 140 | +## License |
| 141 | + |
| 142 | +[MIT](/LICENSE) |
| 143 | + |
| 144 | +<br> |
| 145 | + |
| 146 | +## Meet The Team |
| 147 | + |
| 148 | +| Name | GitHub | LinkedIn | |
| 149 | +| -------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 150 | +| Kyler Chiago | [](https://github.com/Kyler-Chiago) | [](https://www.linkedin.com/in/kyler-chiago/) | |
| 151 | +| Austin Fraser | [](https://github.com/austinbfraser) | [](http://www.linkedin.com/in/austin-fraser) | |
| 152 | +| Stephany Ho | [](https://github.com/seneyu) | [](https://www.linkedin.com/in/stephanyho/) | |
| 153 | +| Winston Ludlam | [](https://github.com/winjolu/) | [](https://www.linkedin.com/in/wjludlam/) | |
| 154 | +| Yiqun Zheng | [](https://github.com/yiqunzheng) | [](https://www.linkedin.com/in/yiqunzheng/) | |
0 commit comments