refactor Trainer train/val loop

This commit is contained in:
2026-03-05 01:14:24 -08:00
parent c473e48b5b
commit 805262dfc4
13 changed files with 462 additions and 128 deletions

View File

@@ -2,16 +2,10 @@
Package summary goes here, ideally with a diagram
# Install
Installation instructions
The `trainlib` package can be installed from PyPI:
```sh
pip install <package>
```
or as a CLI tool
```sh
uv tool install <package>
pip install trainlib
```
# Development
@@ -20,16 +14,16 @@ uv tool install <package>
- Depending on needs, install the development dependencies with `uv sync
--extra dev`.
# Testing
## Testing
- To run the unit tests, make sure to first have the test dependencies
installed with `uv sync --extra test`, then run `make test`.
- For notebook testing, run `make install-kernel` to make the environment
available as a Jupyter kernel (to be selected when running notebooks).
# Documentation
## Documentation
- Install the documentation dependencies with `uv sync --extra doc`.
- Run `make docs-build` (optionally preceded by `make docs-clean`), and serve
locally with `docs-serve`.
locally with `make docs-serve`.
# Development remarks
- Across `Trainer` / `Estimator` / `Dataset`, I've considered a