Facilitates automated and reproducible experimental research
Project description
Every experiment is sacredEvery experiment is greatIf an experiment is wastedGod gets quite irate
Announcement :loudspeaker: |
Sacredboard is doing a user-study to find out what a good frontend for Sacred should look like. If you use Sacred and are interested in a frontend to browse through your results, please consider participating. Thank you! |
Sacred is a tool to help you configure, organize, log and reproduce experiments. It is designed to do all the tedious overhead work that you need to do around your actual experiment in order to:
keep track of all the parameters of your experiment
easily run your experiment for different settings
save configurations for individual runs in a database
reproduce your results
Sacred achieves this through the following main mechanisms:
ConfigScopes A very convenient way of the local variables in a function to define the parameters your experiment uses.
Config Injection: You can access all parameters of your configuration from every function. They are automatically injected by name.
Command-line interface: You get a powerful command-line interface for each experiment that you can use to change parameters and run different variants.
Observers: Sacred provides Observers that log all kinds of information about your experiment, its dependencies, the configuration you used, the machine it is run on, and of course the result. These can be saved to a MongoDB, for easy access later.
Automatic seeding helps controlling the randomness in your experiments, such that the results remain reproducible.
Example
Script to train an SVM on the iris dataset |
The same script as a Sacred experiment |
|
|
Documentation
The documentation is hosted at ReadTheDocs.
Installing
You can directly install it from the Python Package Index with pip:
pip install sacred
Or if you want to do it manually you can checkout the current version from git and install it yourself:
You might want to also install the numpy and the pymongo packages. They are optional dependencies but they offer some cool features:
pip install numpy, pymongo
Tests
The tests for sacred use the py.test package. You can execute them by running py.test in the sacred directory like this:
py.test
There is also a config file for tox so you can automatically run the tests for various python versions like this:
tox
Frontends
At this point there are two frontends to the database entries created by sacred (that I’m aware of). They are developed externally as separate projects.
Sacredboard
Sacredboard is a web-based dashboard interface to the sacred runs stored in a MongoDB.
SacredBrowser
SacredBrowser is a PyQt4 application to browse the MongoDB entries created by sacred experiments. Features include custom queries, sorting of the results, access to the stored source-code, and many more. No installation is required and it can connect to a local database or over the network.
Prophet
Prophet is an early prototype of a webinterface to the MongoDB entries created by sacred experiments, that is discontinued. It requires you to run RestHeart to access the database.
License
This project is released under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sacred-0.7b3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8238484f3daddc78d9f6c52745c450078364b68a5b02147039e5019f8483e9dc |
|
MD5 | 6d7c27ad9710be729f403fda405633c2 |
|
BLAKE2b-256 | aadedc70ba8c98e400b4343ceecb59df582b6f5af19aa43b695c89b2c5c62669 |