Brontes
Brontes is your helping cyclops for pytorch models training. It is based on pytorch_lightning and comes with an example script in examples/mnist/run.py that you can adapt for your needs.
Additionally, there is an example in examples/mlflow which describes how to use mlflow with Brontes.
Just do this
Define your dataset_loaders as a dictionary: use train, val and optionally a test split:
dataset_loaders = {
'train':
torch.utils.data.DataLoader(
datasets.MNIST(
root=DATA_PATH,
train=True,
download=True
),
batch_size=BATCH_SIZE,
shuffle=True,
num_workers=NUMBER_OF_WORKERS
),
'val':
torch.utils.data.DataLoader(
datasets.MNIST(
root=DATA_PATH,
train=False,
download=True
),
batch_size=BATCH_SIZE,
shuffle=True,
num_workers=NUMBER_OF_WORKERS
)
}
define your acrhitecture as a torch.nn.Module (or pick an existing architecture):
base_model = brontes.examples.Net()
and wrap it with Brontes:
brontes_model = Brontes(
model=base_model,
loss=torch.nn.NLLLoss(),
data_loaders=dataset_loaders,
optimizers=optimizer
)
finally train the model using pytorch_lighning
trainer = pl.Trainer(max_nb_epochs=EPOCHS)
trainer.fit(brontes_model)
Development setup
Setup the conda environment
conda env create -f conda.yml
Activate it:
conda activate brontes
Metadata
Release files for brontes 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| brontes-0.0.2.tar.gz | 4.9 kB | Without provenance | Details |
Release files / brontes-0.0.2.tar.gz
| Download URL | brontes-0.0.2.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21d5a7fe3cb8acfc9a353e4a55651ecc001eb5f507c57d94544939099d45de17
|
|
BLAKE2b-256 checksum How to use checksums |
252c1792ffcecbfff693c46c04d05944394f02a015722d0f85c4a761a0f9c12a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.3
|
Security for brontes 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.