Keep track of digital experiments.
Project description
A lightweight python package for recording and analysing configurations and results of coding experiments.
Installation
pip install digital-experiments
Basic Use
- Define your experiment as a pure-python function, and decorate it with
@experiment
:
from digital_experiments import experiment
@experiment
def my_experiment(a, b=2):
return a ** b
- Call the function as normal:
>>> my_experiment(2, 3)
8
>>> my_experiment(4)
16
- Access the results of the experiment:
>>> my_experiment.observations()
[Observation(<id1>, {'a': 2, 'b': 3} → 8}),
Observation(<id2>, {'a': 4, 'b': 2} → 16})]
If you have pandas
installed, you can also access these results as a DataFrame
:
>>> my_experiment.to_dataframe()
id config.a config.b result
0 <id1> 2 3 8
1 <id2> 4 2 16
Documentation
For more information, see the documentation.
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
digital-experiments-2.0.2.tar.gz
(15.6 kB
view hashes)
Built Distribution
Close
Hashes for digital-experiments-2.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a703ff197dd0362321b0d69bc99660891408d06027c1efae67ce23dc69a3a862 |
|
MD5 | 337c27dc98ebc1ce65a3e63b0ef48e7b |
|
BLAKE2b-256 | 5eee4c81f3994a26c753c4202a872ade96e22183cf6c004875337a0711f9e401 |
Close
Hashes for digital_experiments-2.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a498e213d8b5ee7d33b06b4e4a010d58004cb13abb0a0771f83eda192603b867 |
|
MD5 | 5da5234d8c72ef47a8250b557b3dd29a |
|
BLAKE2b-256 | fea129473e725537e53bdeee31f0b052e1388c419c931c3724cf2ed864e7da08 |