Skip to main content

Precision AI Logo

Precision AI Pace

License PyPI Python


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 and configure() 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 the adopt-pace skill's verify.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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for precisionai-pace 1.0.1
File Size Uploaded Provenance Actions
precisionai_pace-1.0.1.tar.gz 99.9 kB With provenance Details for precisionai_pace-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for precisionai-pace 1.0.1
File Interpreter ABI Platform Actions
precisionai_pace-1.0.1-py3-none-any.whl Python 3 none any Details for precisionai_pace-1.0.1-py3-none-any.whl

Total release size: 164.2 kB

Release files / precisionai_pace-1.0.1.tar.gz

Download URL precisionai_pace-1.0.1.tar.gz
Size 99.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dc5c8fda042eeab277162c9ddfedd855013b5f667ec4a5dcfe9feb2997ed9568
BLAKE2b-256 checksum
How to use checksums
60de7e7e212d5e3b27b74c02d033a46f75fe130bd2e88f37aa6d8b7d649abee8
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 log

Release files / precisionai_pace-1.0.1-py3-none-any.whl

Download URL precisionai_pace-1.0.1-py3-none-any.whl
Size 64.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
475daf938c19ec12662cf71ea6e691a07dff8196b93586065ac11aa8af030eed
BLAKE2b-256 checksum
How to use checksums
cb3a1635d35cd07bbd90856279ef33cf42c03e6726a2fea976f502d0ea1795b9
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 log

Security for precisionai-pace 1.0.1

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.

Select from 2 files

Attestation for precisionai_pace-1.0.1.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 log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page