# mlflow

> MLflow api client for Node.js

Latest version **2.0.7** (published 2019-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install mlflow
pnpm add mlflow
yarn add mlflow
bun add mlflow
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: has types.

Warnings: low downloads; no esm support; has vulnerabilities.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.7 |
| Published | 2019-08-21 |
| First published | 2019-06-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.4 KB |
| Known vulnerabilities | 2 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Yuhsak Inoue |
| Maintainers | yuhsak |

## Links

- npm: https://www.npmjs.com/package/mlflow
- Repository: https://github.com/Yuhsak/mlflow
- Homepage: https://github.com/Yuhsak/mlflow#readme
- Issues: https://github.com/Yuhsak/mlflow/issues
- npm.io page: https://npm.io/package/mlflow

## Dependencies (1)

- [isomorphic-unfetch](https://npm.io/package/isomorphic-unfetch.md) ^3.0.0

## Recent versions

- 2.0.7 (latest) — 2019-08-21
- 2.0.6 — 2019-08-21
- 2.0.5 — 2019-08-21
- 2.0.4 — 2019-08-21
- 2.0.3 — 2019-08-21
- 2.0.2 — 2019-08-21
- 2.0.1 — 2019-08-21
- 2.0.0 — 2019-08-21
- 1.0.2 — 2019-06-10
- 1.0.1 — 2019-06-10

## README

# mlflow
MLflow api client for Node.js

## Install

```sh
npm install mlflow
```

## Usage

```js
const MLflow = require('mlflow')
const {ViewType, RunState, LifecysleStage} = require('mlflow/enum')

const client = new MLflow({endpoint: 'http://localhost:5000'})

const {Experiments, Runs, Metrics, Artifacts} = client

;(async () => {
	
	// Get list of all experiments
	const {experiments} = await Experiments.list()
	const experiment = experiments[0]
	
	// Get list of all active runs in specific experiment
	const {runs} = await Runs.search({
		experiment_ids: [experiment.experiment_id],
		run_view_type: ViewType.ACTIVE_ONLY
	})
	const {info, data} = runs[0]
	const {run_id} = info
	
	// Get metric history
	const auc_history = await Metrics.getHistory({run_id, metric_key: 'auc_score'})
	console.log(auc_history)
	
})()
```

## API

### MLflow

#### Constructor

- **endpoint**:string (required)
	- MLflow server's endpoint url
	- ex.) 'http://localhost:5000'

- **heders**:object (option)
	- Key-Value pairs of RequestHeaders which will be passed for fetch method. 
	- ex.) {Authorization: 'Bearer abcdefgh'}

#### Props 

- [Experiments](https://github.com/Yuhsak/mlflow/blob/master/src/experiments.ts)
- [Runs](https://github.com/Yuhsak/mlflow/blob/master/src/runs.ts)
- [Metrics](https://github.com/Yuhsak/mlflow/blob/master/src/metrics.ts)
- [Artifacts](https://github.com/Yuhsak/mlflow/blob/master/src/artifacts.ts)

### [Experiments](https://github.com/Yuhsak/mlflow/blob/master/src/experiments.ts)

- create()
- restore()
- get()
- list()
- update()
- delete()
- setExperimentTag()

### [Runs](https://github.com/Yuhsak/mlflow/blob/master/src/runs.ts)

- create()
- restore()
- get()
- search()
- update()
- delete()
- logMetric()
- logParam()
- setTag()
- deleteTag()
- logBatch()

### [Metrics](https://github.com/Yuhsak/mlflow/blob/master/src/metrics.ts)

- getHistory()

### [Artifacts](https://github.com/Yuhsak/mlflow/blob/master/src/artifacts.ts)

- list()

For more details about each method's args, also see [MLflow REST API Official Docs](https://mlflow.org/docs/latest/rest-api.html).  
API's are basically implemented just as they are.

---
_Source: https://npm.io/package/mlflow · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
