Skip to main content

Simple tools for logging experiments in algorithm engineering

Project description

AeMeasure

Provides a Python module for simple measurements of algorithm engineering experiments. Maybe it will also get a scheduler.

from aemeasure import Measurement, read_as_pd

with Measurement("my_database.json", capture_stdout="stdout", capture_stderr="stderr") as m:
    m["instance"] = "fancy_instance"
    m["size"]
    m["algorithm"] = "fancy_algorithm"
    m["parameters"] = "asdgfdfgsdgf"
    solution = run_algorithm()
    m["solution"] = solution.to_json_dict()
    m["objective"] = 42
    m["lower_bound"] = 13
    m.save_metadata()


table = read_as_pd("my_database.json", ["instance", "size", "algorithm", "runtime"])
table.plot(x="size", y="runtime")

Following data can easily be saved:

  • Runtime (enter and exit of Measurement)
  • stdout/stderr
  • Git Revision
  • Timestamp of start
  • Hostname
  • Arguments
  • Python-File

Except of stdout and stderr, these values are automatically saved when using m.save_metadata().

The database currently is a simple json which is rather inefficient but works. You should not use it in parallel because then there can be collisions when writing to the database. Use different files when working in parallel!

A parallel version is planned that sets up a local server and also allows multiple workstations. It should also be easy to let it do the scheduling.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aemeasure-0.0.4-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file aemeasure-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: aemeasure-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for aemeasure-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 418c6d9e7f17eb1cccf421fd23ad90a7b040f517061cf9b06e623f85a5db3797
MD5 81a7c5314c60adb9cb6d0a668eee5cae
BLAKE2b-256 59a1001a0ef69a61db23f1a47116cf31b9271c68e5c46bc66d1bd3e0c774e917

See more details on using hashes here.

Supported by

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