Skip to main content

A Python package for using PyTorch Lightning with custom callbacks and model wrappers.

Project description

PyPI version

PyTorch Lightning Trainer Utilities

ML Model Assumptions

forward

  • The model wrapper uses the forward function as follows:
    output = self.model(**x, **self.forward_kwargs)
    return ModelOuput(**output)

It expects batch as dict and returns a dict with keys [loss, report, output].

return

  • ML model should return a dict with the following keys:
    • loss
    • report
    • output [optional]

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

lightning_trainer_utils-2025.5.16.9.1.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lightning_trainer_utils-2025.5.16.9.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file lightning_trainer_utils-2025.5.16.9.1.tar.gz.

File metadata

File hashes

Hashes for lightning_trainer_utils-2025.5.16.9.1.tar.gz
Algorithm Hash digest
SHA256 7c2833cbb9251bb170493d276a5c3b83a173cfad7c4f42a3d52af53e03d6786a
MD5 14c2c0894b9c2b31b60f89781066ac45
BLAKE2b-256 977cf0580e3dd17751f4ae7c5e12f1a9d56e7e73d2d46ea5c23b98f057b25e95

See more details on using hashes here.

Provenance

The following attestation bundles were made for lightning_trainer_utils-2025.5.16.9.1.tar.gz:

Publisher: workflow.yaml on manavmahan/lightning-trainer-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lightning_trainer_utils-2025.5.16.9.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lightning_trainer_utils-2025.5.16.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ba56441dbfd49cd068be510dec73a49ac310450e1bc2c9985396cce8cc2b327
MD5 6b5c6b0afd67a90096b1a4367e6a3ce5
BLAKE2b-256 185e511f6bc3a0b247c8368b7875919b61114f0f03fe51aa80a2112473c68ee2

See more details on using hashes here.

Provenance

The following attestation bundles were made for lightning_trainer_utils-2025.5.16.9.1-py3-none-any.whl:

Publisher: workflow.yaml on manavmahan/lightning-trainer-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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