Precision AI Pace
Pace is a logger with progress reporting whose output a scheduler or dashboard can read. It reads like any good logger in a terminal, and every progress line also carries a short, machine-readable trailer from which a scheduler can estimate when the job will finish.
- One way to log across projects: the same levels, format and progress bars everywhere.
- Progress for real ML work: loops, manual counters, timed steps, phases, PyTorch Lightning and Hugging Face training.
- Completion estimates: the terminal shows time remaining, and a scheduler or dashboard gets the same estimate from the job's logs.
- No dependencies in the core, and Python 3.11 or later, so it fits into existing training images.
Installation
pip install precisionai-pace
Usage
from precisionai.pace import capture_logging, logger, progress, track
capture_logging() # route PyTorch's and Transformers' standard logging through Pace
logger.info("Loading model")
logger.success("Model ready")
for batch in track(loader, description="Inference", unit="batch"):
infer(batch)
with progress(total=len(requests), description="Evaluation", unit="request") as run:
for future in as_completed(futures):
consume(future.result())
run.advance()
Also available: timed, phase and plan for multi-stage jobs, root=True to mark
the scope that stands for the whole job, and completed= with resumed=True to resume
from a checkpoint. Settings come from logger.configure(...) or PACE_* environment
variables, so a scheduler can change them without code changes.
In a terminal, progress is one bar that redraws in place. In a container or a log file it is a rate-limited line like this one:
2026-11-03T17:36:42Z PROGRESS Train 1840/5000 36.8% 2.4 step/s · ~21m57s [pace train c=1840 t=5000 e=763.1 q=57 r=6bfc3dd5 root]
The part before [pace ...] is for people. The bracketed trailer is a stable format
that only grows, described in docs/design.md; a program that reads it
should use parse_line, LineSplitter and JobForecast (see
Reading Pace output).
Documentation
| Page | Read it for |
|---|---|
| Getting started | Install, first log lines, first progress loop, terminal vs container output. |
| Running on a cluster or scheduler | The five steps for a job that runs in a container or under a scheduler, the adopt-pace skill, and what running real jobs taught. |
| Logging | Levels, exception, configure and precedence, capture_logging, colour, encodings, ranks. |
| Progress | track, progress, timed, phase, plan, nesting, resuming, root scope, emission rates, the terminal bar. |
| Examples | One runnable script per style of logging and progress: loops, epochs, resuming, phases, ranks, reading the output. |
| Framework integrations | The PyTorch Lightning and Hugging Face Transformers callbacks. |
| Migrating | From print, tqdm, Loguru and logging. |
| Configuration | Every PACE_* variable and its configure equivalent. |
| Reading Pace output | For programs that read logs: parsing, de-duplication, estimates, conformance fixtures. |
| FAQ | Short answers. |
| Specification | The line format and the forecasting rules. |
The HTML build of these pages (and the module reference) is produced with Sphinx:
cd docs
make html # HTML docs → docs/_build/html/index.html
make latexpdf # PDF → docs/_build/latex/documentation.pdf
Dependencies: pip install -r docs/requirements.txt
Compatibility
Pace follows semantic versioning. From 1.0:
- Python API: stable. It is everything in
precisionai.pace.__all__and in the__all__of each public submodule (core,scopes,capture,protocol,forecast,lightning,transformers,tqdm,version). - The
[pace ...]trailer: permanent, and it only grows. No key or word is ever removed or redefined, readers ignore keys and words they do not know, and there is no version marker. PACE_*variables andconfigure()options: names and accepted values are stable.ForecastConfig: field names are stable. Defaults and the estimation algorithm may change in a minor release.- Not covered: the readable text before the trailer, the estimate numbers,
_-prefixed names and modules, and theadopt-paceskill'sverify.py.
A deprecated name keeps working, with a DeprecationWarning, for at least one minor
release before it is removed. Dropping a Python version that has reached end of life
happens in a minor release. The detail is in
Specification: compatibility.
Development
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pre-commit install
python -m pytest
Coverage must remain at or above 90%, enforced by pytest and the pre-commit hook. CI runs the tests on Python 3.11 through 3.14.
Project layout
precisionai/pace/ # the package (core: standard library only)
docs/ # Sphinx (HTML + LaTeX/PDF), including design.md
skills/adopt-pace/ # Claude Code skill that adds Pace to a repository
examples/ # runnable examples
tests/ # mirrors the package structure
See CLAUDE.md for the coding standard.
Releasing
Push a tag matching v*.*.* (e.g. v1.0.0) to trigger .github/workflows/release.yml,
which runs the test suite, builds the sdist and wheel, publishes to PyPI via trusted
publishing, and creates a GitHub Release. The version comes from the git tag via
setuptools-scm. Update CHANGELOG.md before tagging.
Security
To report a security vulnerability, see SECURITY.md. Do not open a public issue.
Contributing
See CONTRIBUTING.md for setup and PR guidelines, and CODE_OF_CONDUCT.md for community expectations.
License
Apache 2.0 © Precision AI
Metadata
Release files for precisionai-pace 1.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 | Actions |
|---|---|---|---|---|
| precisionai_pace-1.0.2.tar.gz | 100.4 kB | With provenance | Details for precisionai_pace-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| precisionai_pace-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for precisionai_pace-1.0.2-py3-none-any.whl |
Total release size: 165.0 kB
Release files / precisionai_pace-1.0.2.tar.gz
| Download URL | precisionai_pace-1.0.2.tar.gz |
|---|---|
| Size | 100.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9325cc0592e546f0b76e7e0cb486be6f4dd5fb98aeb9d68b21e04ba733b523b
|
|
BLAKE2b-256 checksum How to use checksums |
161979ab6549ec06e1f960c0540adab334e533af61ce56a8306c7c9f4d39460b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / precisionai_pace-1.0.2-py3-none-any.whl
| Download URL | precisionai_pace-1.0.2-py3-none-any.whl |
|---|---|
| Size | 64.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc28281f3ef261a84eda2245796f26df6d954e49651ed7ed0a738a9becdc02d6
|
|
BLAKE2b-256 checksum How to use checksums |
16339225fb285a7147b493507d112ee9677c42841af215223bf9bcca43dcdd43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for precisionai-pace 1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for precisionai_pace-1.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA 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.