Skip to main content

A library for managing, exploring, and analyzing benchmark data.

Project description

MetricX

Build Status Documentation Code Coverage PyPI version

A library for managing, exploring, and analyzing benchmark data. Given a set of tasks and a set of models which can be evaluated on the tasks, MetricX provides a suite of features including:

  • Monitoring and logging of modeling results.
  • Export to CSV, matplotlib, bokeh, and more!
  • Smart selection of the next model to evaluate.
  • Interactive visualization in Jupyter notebooks.
  • Interactive HTML reports (deployable via Github Pages).

Quick Start

Install MetricX

You can install the latest stable release

pip install metricx

Or you can install the development head

pip install git+https://github.com/k15z/MetricX.git

Define your task

First, you'll want to define your task(s). Every task has a name and a set of metrics.

from metricx import Metric, Task

task = Task(
    name="mnist-digits",
    metrics=[
        Metric(name="accuracy", is_higher_better=True),
        Metric(name="fit-time", is_higher_better=False),
        Metric(name="predict-time", is_higher_better=False),
    ],
)

Report your results

Then, you can report your results by providing (1) the name of the model being evaluated and (2) a results dictionary containing a value for each of the metrics specified earlier.

task.report("convnet", {
  "accuracy": 1.0, 
  "fit-time": 100.0,
  "predict-time": 3.0,
})
task.report("logistic-regression", {
  "accuracy": 0.6, 
  "fit-time": 10.0,
  "predict-time": 1.0,
})

Generate plots and rankings

The Task object provides numerous functionality from generating plots to ranking models.

task.to_bokeh() # generate a Bokeh plot
task.to_figure() # generate a matplotlib Figure
task.rank() # return a ranking of models

Combine multiple tasks

If you have multiple tasks, as is typical in a benchmarking scenario, you can use the TaskGrid to wrap them together and generated combined visualizations and more.

from metricx import TaskGrid

grid = TaskGrid([task])
grid.to_html("benchmark.html")

This will create a standalone HTML file which allows you to interactively explore the benchmark results.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metricx-0.0.2.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

metricx-0.0.2-py2.py3-none-any.whl (9.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file metricx-0.0.2.tar.gz.

File metadata

  • Download URL: metricx-0.0.2.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for metricx-0.0.2.tar.gz
Algorithm Hash digest
SHA256 453262b9f1581ed41cefe6bc3b240efc54a4b89533fa7dd6c1a3594ec252e7fa
MD5 0714c221f0baa17c5874717ecd99742a
BLAKE2b-256 f434f9a7605b8f3af2329969a112f22d8aca9511c3e4cc0040c781524e2254b5

See more details on using hashes here.

File details

Details for the file metricx-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: metricx-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for metricx-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 36ad6423de0faed39dcb0f06f3757a57d795497af7f5ab9b957be5a2c9a6885d
MD5 5e8ff261f9556b378b3795f5ae5c8779
BLAKE2b-256 bea9ad22a3f69e3043f6392e08c5ef78bfcee216bfabbae68ddd7aa7d1103322

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page