mehdi-shiba / exprec

Exprec records your execution runs so you can compare different experiments and more easily reproduce results

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exprec

Exprec records your execution runs so you can compare different experiments and more easily reproduce results.

Installation

pip install git+https://github.com/martno/exprec.git

Usage

Code example

from exprec import Experiment

with Experiment() as experiment:
    pass
    # YOUR CODE HERE

All output in this with statement will be logged to a file which can later be accessed in the dashboard (see below). Also, all python code and installed packages are recorded as well.

Dashboard

In your terminal:

exprec

Now visit http://localhost:5000/ in your browser to see the dashboard.

More code examples

from exprec import Experiment

with Experiment(name='experiment-1', tags=['tag1', 'tag2']) as experiment:
    experiment.set_parameter('test_parameter', 5)

    experiment.add_scalar('scalar1', 4, step=0)
    experiment.add_scalar('scalar1', 5, step=1)

    with experiment.open('filename.txt', mode='w') as fp:
        fp.write('test\n')
        # This creates a file in the experiment's folder (`.experiments/<experiment-id>/files/filename.txt`). It can be
        # accessed by other experiments using
        # `with experiment.open('filename.txt', mode='w', uuid=previous_experiment_uuid) as fp:`.
        # When opening a previous experiment's file, the previous experiment will be referred to as 
        # the current experiment's parent (shown in the summary in the dashboard). 

    raise ValueError('Invalid value')
    # The experiment will finish with status 'failed'. The exception is also logged. 

Licence

MIT Licence

About

Exprec records your execution runs so you can compare different experiments and more easily reproduce results

License:MIT License


Languages

Language:Python 73.3%Language:JavaScript 14.9%Language:HTML 10.7%Language:CSS 1.1%