Skip to content

yuhsak/mlflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mlflow

MLflow api client for Node.js

Install

npm install mlflow

Usage

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)

  • heders:object (option)

    • Key-Value pairs of RequestHeaders which will be passed for fetch method.
    • ex.) {Authorization: 'Bearer abcdefgh'}

Props

  • create()
  • restore()
  • get()
  • list()
  • update()
  • delete()
  • setExperimentTag()
  • create()
  • restore()
  • get()
  • search()
  • update()
  • delete()
  • logMetric()
  • logParam()
  • setTag()
  • deleteTag()
  • logBatch()
  • getHistory()
  • list()

For more details about each method's args, also see MLflow REST API Official Docs.
API's are basically implemented just as they are.

About

MLflow api client for Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published