LightEx: A Light Experiment Manager
Project description
LightEx
LightEx
is a lightweight experiment framework to create, monitor and record your machine learning experiments. Targeted to individual data scientists, researchers, small teams and, in general, resource-constrained experimentation.
Yet another experiment framework?
Systematic experimentation tools are essential for a data scientist. Unfortunately, many existing tools (kubeflow
, mlflow
, polyaxon
) are too monolithic, cloud-first, target very diverse audiences and hence spread too thin, and yet lack important dev-friendly features. Other tools cater only to a specific task , e.g., tensorboard
only handles log recording and visualization. Also, contrasting different experiment frameworks is hard: there is no standardized expt-management architecture for machine learning and most open-source frameworks are undergoing a process of adhoc requirements discovery.
Our USP:
- We study the anatomy of a ML expt-framework. Identify principal components: flexible configuration, job dispatcher, multi-logger, log visualization and querying, storage virtualization.
- This informs the modular design of
LightEx
: all the key components are included and integrated via a flexible configuration manager. By design, the components are decoupled, swappable and can be developed independently. Codebase is small, easily navigable (hopefully stays that way). - We don't re-invent the wheel. The job dispatcher builds over the docker/kubernetes ecosystem, we use
mlflow
as our primary log tracker and visualizer, and employ pythondataclass
based flexible configuration specs, both for jobs and models. - We target resource-constrained computing environments, small teams of researchers and quick dev-cycles. Though, hoping that our modular design eventually makes scaling a no-brainer.
- Read more about design here.
LightEx
setup cost is low for your existing projects:
- Add or update your logging code using
LightEx
'smulti_logger
API. Example here. - Update config instances in
config_expts.py
(mainly, the hyperparameter classHP
and run command templatecmd
)
Getting Started
pip install lightex
- In your project directory:
lightex init
This creates config_expts.py
, run_expts.py
in the project directory.
-
Install
docker
,microk8s
. Instructions here -
Spin up the backend e.g., mlflow tracker, tensorboard, etc.
- start backend services:
lightex up
- start backend services:
-
Configure and execute experiments
- Build your project docker container which contains all library dependencies, except the code and data, which are mounted separately.
- Update
config_expts.py
. See here for config schema. python run_expts.py --config-name C
Here,C
is a config instance defined inconfig_expts.py
. See here for examples.
Directory Structure
lex/
bin/
legen
leup
backend/
lex/
config/
config_backend.py
config_expts.py
Random
- A lot of it looks like setting up giant web of configuration variables.
- No optimal choice here:
json
,yaml
,jsonnet
— all formats have issues. - Using
dataclass
es, we can write complex config specs, with built-in inheritance and update features. Tiny bit of a learning curve here, but a lot of flexibility.
- No optimal choice here:
References
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
Built Distribution
File details
Details for the file lightex-0.0.2.tar.gz
.
File metadata
- Download URL: lightex-0.0.2.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.19.7 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
28208a0b208b8ef1d1e87298b85f47b839850728f5ff948a1e6111b48014c300
|
|
MD5 |
472f7e941bd62e96f1fdc49729c760f3
|
|
BLAKE2b-256 |
a335cdf54aeed9ffb6798fb1db715c001ccd31dabd49f532993ecd5cff895b15
|
File details
Details for the file lightex-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: lightex-0.0.2-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.19.7 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2ce9ecd261d688bf3e279844e92b5d3e0e386f01b2ecdeb7532c6009b54356f1
|
|
MD5 |
30d14c6023ce4bb6dd9a9ab72af5c699
|
|
BLAKE2b-256 |
d845595c95af5e6acef5d02da1471cfd3bbb5947ad68ee2eb4cb076c71601657
|