跳转到主要内容

一个用于管理、探索和分析基准数据的库。

项目描述

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

  • 监控和记录建模结果。
  • 导出到CSV、matplotlib、bokeh等!
  • 智能选择下一个要评估的模型。
  • Jupyter笔记本中的交互式可视化。
  • 交互式HTML报告(可通过GitHub Pages部署)。

快速入门

安装MetricX

您可以安装最新稳定版本

pip install metricx

或者您可以安装开发头

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

定义你的任务

首先,您需要定义您的任务(s)。每个任务都有一个名称和一组度量。

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),
    ],
)

报告你的结果

然后,您可以通过提供(1)正在评估的模型名称和(2)一个包含先前指定度量的值的字典来报告您的结果。

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,
})

生成图表和排名

Task对象提供从生成图表到排名的众多功能。

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

组合多个任务

如果您有多个任务,这在基准测试场景中很典型,您可以使用TaskGrid将它们组合在一起并生成组合的可视化和更多内容。

from metricx import TaskGrid

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

这将创建一个独立的HTML文件,允许您交互式地探索基准测试结果。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

metricx-0.0.2.tar.gz (15.3 kB 查看哈希值)

上传时间

构建分发

metricx-0.0.2-py2.py3-none-any.whl (9.5 kB 查看哈希值)

上传时间 Python 2 Python 3

支持者