Skip to main content

Organize Machine Learning Experiments

Project description

https://badge.fury.io/py/labml.svg https://pepy.tech/badge/labml

LabML

LabML lets you monitor AI model training on mobile phones.

Mobile view

You can install this package using PIP.

pip install labml

To push to mobile website, you need obtain a token from web.lab-ml.com (Github lab-ml/app), and save statistics with tracker.save.

PyTorch example

from labml import tracker, experiment

with experiment.record(name='sample', exp_conf=conf):
    for i in range(50):
        loss, accuracy = train()
        tracker.save(i, {'loss': loss, 'accuracy': accuracy})

Pytorch Lightening example

from labml import experiment
from labml.utils.lightening import LabMLLighteningLogger

trainer = pl.Trainer(gpus=1, max_epochs=5, progress_bar_refresh_rate=20, logger=LabMLLighteningLogger())

with experiment.record(name='sample', exp_conf=conf, disable_screen=True):
    trainer.fit(model, data_loader)

TensorFlow 2.X Keras example

from labml import experiment
from labml.utils.keras import LabMLKerasCallback

with experiment.record(name='sample', exp_conf=conf):
    for i in range(50):
        model.fit(x_train, y_train, epochs=conf['epochs'], validation_data=(x_test, y_test),
                  callbacks=[LabMLKerasCallback()], verbose=None)

You can read the guides about creating an experiment, and saving statistics with tracker for details.

It automatically pushes data to Tensorboard, and you can keep your old experiments organized with the LabML Dashboard

Dashboard Screenshot

All these software is 100% open source, and your logs will be stored locally for Tensorboard and LabML Dashboard. You will only be sending data away for web.lab-ml.com if you include a token url. This can also be locally installed.

LabML can also keep track of git commits, handle configurations, hyper-parameters, save and load checkpoints, and providing pretty logs.

Logger output

We also have an API to create custom visualizations from artifacts and logs on Jupyter notebooks.

Analytics

Citing LabML

If you use LabML for academic research, please cite the library using the following BibTeX entry.

@misc{labml,
 author = {Varuna Jayasiri, Nipun Wijerathne},
 title = {LabML: A library to organize machine learning experiments},
 year = {2020},
 url = {https://lab-ml.com/},
}

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

labml-0.4.75.tar.gz (71.8 kB view hashes)

Uploaded Source

Built Distribution

labml-0.4.75-py3-none-any.whl (105.3 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