Lightweight PyTorch tensor diagnostics hooks for training loops
Project description
model-diagnostics
Install
pip install model-diagnostics
Quick Start
from model_diagnostics import maybe_attach_diagnostics
diag = maybe_attach_diagnostics(model)
for step, batch in enumerate(train_loader):
loss = train_step(batch)
loss.backward()
optimizer.step()
optimizer.zero_grad()
if diag and diag.should_stop(step, stop_after_steps=6):
diag.print(f"{args.exp_dir}/diagnostics-step-{step}.txt")
break
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
nndiagnostics-0.1.0.tar.gz
(5.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nndiagnostics-0.1.0.tar.gz.
File metadata
- Download URL: nndiagnostics-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6f67a927b43fb614b8c22026d280c8ec52a3674b966032beaa3a08257f83ef3
|
|
| MD5 |
bd945e4d828979b8b915ae21f6a8380e
|
|
| BLAKE2b-256 |
ad1da53ce674e8779a41830d5d9119457cf27de672d23e520a1f05615f7deefe
|
File details
Details for the file nndiagnostics-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nndiagnostics-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
365a888fd8157f5e967d35e000e3150de27c6385f707a0bbf128baf13e9c421b
|
|
| MD5 |
bfe4598a2205a393a51bd20be772d7b2
|
|
| BLAKE2b-256 |
917bf6ac4a2ffcd6a344ced08eea96ef8a03e722662471432b5759c2c46c703a
|