Skip to main content

lockstep-train

Train a policy on your own machine against a Lockstep environment's real engine.

pip install lockstep-train

In the folder lockstep invite get (or lockstep training get) wrote:

import lockstep_train

env = lockstep_train.make(".")                       # a Gymnasium environment
obs, info = env.reset(seed=7)                        # the match `lockstep run --seed 7` plays
obs, reward, terminated, truncated, info = env.step(env.action_space.sample())

vec = lockstep_train.make_vec(".", 8)                # 8 matches at once, one thread each
  • Every step is a turn of the real match: the same engine, rules and opponents as lockstep run, deterministic for the same seed and actions.
  • The spaces are the ONNX shell's: one observation per declared input, one action per tensor the shell reads (an f32 output in [-1, 1], a discrete head per coded output). Export your network with one ONNX output per action entry, put it in a policy bundle, and lockstep check --agent <bundle> plays it exactly as Lockstep will.
  • Reward: the environment's own per-turn training reward (or a series you name, reward="series:<key>", or the score at the end, "score"); info carries every declared series and, at the end, the score and the ending.
  • LabelledStream turns an environment's delayed feedback into (observation, label) pairs for supervised training.

Python 3.11 or later; wheels for macOS (Apple silicon), Linux (x86_64, arm64) and Windows (x86_64).

Metadata

Release files for lockstep-train 1.0.1

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

Built distributions (wheels)

Table of built distributions (wheels) for lockstep-train 1.0.1
File Actions
lockstep_train-1.0.1-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for lockstep_train-1.0.1-cp311-abi3-win_amd64.whl
lockstep_train-1.0.1-cp311-abi3-manylinux_2_39_x86_64.whl CPython 3.11 abi3 Linux glibc 2.39+ x86-64 Details for lockstep_train-1.0.1-cp311-abi3-manylinux_2_39_x86_64.whl
lockstep_train-1.0.1-cp311-abi3-manylinux_2_39_aarch64.whl CPython 3.11 abi3 Linux glibc 2.39+ ARM64 Details for lockstep_train-1.0.1-cp311-abi3-manylinux_2_39_aarch64.whl
lockstep_train-1.0.1-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for lockstep_train-1.0.1-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 67.4 MB

Release files / lockstep_train-1.0.1-cp311-abi3-win_amd64.whl

Download URL lockstep_train-1.0.1-cp311-abi3-win_amd64.whl
Size 16.6 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d4e572728fb969e007eaba4178495bfdd6886907a43e46fbb7d709c9aeea386f
BLAKE2b-256 checksum
How to use checksums
55cae9aafbff4e1c4cec1e5feef775db15ff5a51f8726e4d1b2cf3bc857d1941
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 19, 2026.

Transparency log

Release files / lockstep_train-1.0.1-cp311-abi3-manylinux_2_39_x86_64.whl

Download URL lockstep_train-1.0.1-cp311-abi3-manylinux_2_39_x86_64.whl
Size 18.1 MB
Tags CPython 3.11 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
c803b46c0cfed42a00013150a68c6c738c904e0460aeea2373847d2fe14c0c21
BLAKE2b-256 checksum
How to use checksums
4dec3e3283d40d246f8beb3f0b271fe62bf431e2e3c0f61e89d0dcdd025db1de
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 19, 2026.

Transparency log

Release files / lockstep_train-1.0.1-cp311-abi3-manylinux_2_39_aarch64.whl

Download URL lockstep_train-1.0.1-cp311-abi3-manylinux_2_39_aarch64.whl
Size 17.7 MB
Tags CPython 3.11 Linux glibc 2.39+ ARM64 abi3
SHA-256 checksum
How to use checksums
704454f091a890dda7bcedb6937c6720eee9606a6738c02f65732159069e80d0
BLAKE2b-256 checksum
How to use checksums
4751764f81238d39b6a60e006766b4640bc604a71aa585b02df3637c9d4e9640
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 19, 2026.

Transparency log

Release files / lockstep_train-1.0.1-cp311-abi3-macosx_11_0_arm64.whl

Download URL lockstep_train-1.0.1-cp311-abi3-macosx_11_0_arm64.whl
Size 15.1 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1b539e376e56d079c24b31d7357b1d1a550973e20456ff7f0d144d220a41ec98
BLAKE2b-256 checksum
How to use checksums
cca941155c82e5a3ea929f92d6a03b6963428c502cd2187e10dedeb0a1be9bf7
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 19, 2026.

Transparency log

Security for lockstep-train 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

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for lockstep_train-1.0.1-cp311-abi3-win_amd64.whl

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 19, 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