Skip to main content

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.

Metadata

Release files for metricx 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metricx 0.0.2
File Size Uploaded Provenance Actions
metricx-0.0.2.tar.gz 15.3 kB Without provenance Details for metricx-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for metricx 0.0.2
File Interpreter ABI Platform Actions
metricx-0.0.2-py2.py3-none-any.whl Python 3, Python 2 none any Details for metricx-0.0.2-py2.py3-none-any.whl

Total release size: 24.8 kB

Release files / metricx-0.0.2.tar.gz

Download URL metricx-0.0.2.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
453262b9f1581ed41cefe6bc3b240efc54a4b89533fa7dd6c1a3594ec252e7fa
BLAKE2b-256 checksum
How to use checksums
f434f9a7605b8f3af2329969a112f22d8aca9511c3e4cc0040c781524e2254b5
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / metricx-0.0.2-py2.py3-none-any.whl

Download URL metricx-0.0.2-py2.py3-none-any.whl
Size 9.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
36ad6423de0faed39dcb0f06f3757a57d795497af7f5ab9b957be5a2c9a6885d
BLAKE2b-256 checksum
How to use checksums
bea9ad22a3f69e3043f6392e08c5ef78bfcee216bfabbae68ddd7aa7d1103322
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for metricx 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page