Skip to main content

Experiment tool for deep learning (PyTorch).

Project description

expon

Experiment tool for deep learning (PyTorch).

features

  1. Git check

    expon could automatically check the git status of current working directory.

    In each experiment, it first check the git status (raise expception if the working tree is not clean), and save the current git commit id for code restore and experiment reproduce.

  2. Experiment save.

    expon save the all the experment information including the defined metrics, config, experiment seed and perhaps metric visualization (like loss-epochs) in one place. The output supports markdown and html form.

demo


from expon import EXP, Params, Metric

# init. The save directory will be './EXP/run/demo/'
exp = EXP(workspace = 'run', exp_name='demo', exp_description='this is a demo')

# experiment params
params = expon.Params()
params.lamb = 1
params.learning_rate = 0.001
params.batch_size = 512

exp.set_params(params)

# experiment metrics
loss = expon.Metric('loss', 'epoch', draw=True)
acc = expon.Metric('acc', draw=True)
exp.add_metric(loss)
exp.add_metric(acc)

# expon will randomly set the random, numpy and torch seed in [0, 999].
exp.set_seed()

# assume 100 epochs
for i in range(0, 100):
    loss.update(1-0.01*i)
    acc.update(0.01*i)

# add addition information
exp.add_info({'final acc': 0.91})

# save the experiment to one place
exp.save(output_format='md', show_metric=False)

Project details


Download files

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

Source Distribution

expon-0.0.7.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

expon-0.0.7-py3-none-any.whl (12.6 kB view hashes)

Uploaded Python 3

Supported by

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