Skip to main content

Python SDK and PPO

The package under sdk/python is versioned 0.4.0a1, the PEP 440 equivalent of application 0.4.0-alpha.1. ExepertRunnerEnv implements Gymnasium with a Discrete(2) action space and Box(12) observation space.

from exepert_env import ExepertRunnerEnv

with ExepertRunnerEnv(seed=42) as env:
observation, info = env.reset(seed=42)
observation, reward, terminated, truncated, info = env.step(1)

The SDK owns a Node worker subprocess, validates the worker manifest and every observation, enforces request timeouts, surfaces stable protocol errors, and shuts down cleanly. hello, reset, step, snapshot, restore, ping, and close use request IDs and worker protocol 1.0.0. Stdout is protocol-only; sanitized diagnostics go to stderr.

The example CLI uses Stable-Baselines3 PPO with MlpPolicy:

pnpm research:train -- --seed 42 --timesteps 50000

Seed and timesteps are recorded in the run manifest. A declared seed supports environment replay, but PyTorch, BLAS, operating-system, and hardware differences can still produce different learned weights.