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
  • Current working directory

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.11-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aemeasure-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 10.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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 13827bc73dd46fcbfdc48ae70239aa4d2a0a49392e64930db7487672f2d4251c
MD5 9efa57c9e374788cd677a2285ed71e96
BLAKE2b-256 1ed718fdbcb8fe446435bdc49cb7b48078f968cc62d6023a0186713a6c2d3bf8

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