docker: bump python from 3.12-slim to 3.14-slim in /deploy - #13
Merged
Conversation
Bumps python from 3.12-slim to 3.14-slim. --- updated-dependencies: - dependency-name: python dependency-version: 3.14-slim dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
DenisDrobyshev
added a commit
that referenced
this pull request
Aug 23, 2026
…old the advertised counts to the code (#16) * perf: make the torch-dependent surface lazy decisionrl.envs, decisionrl.baselines and decisionrl.core are useful to consumers that only simulate or evaluate, but importing any of them pulled in the whole of PyTorch: the top-level package imported every subpackage eagerly, and decisionrl.utils re-exported torch_utils, which decisionrl.core reaches through core/agent.py's Logger import. Resolve the public names through a PEP 562 module __getattr__ instead. Nothing is imported when the package is; each name is resolved and cached on first access. The public API is unchanged - __all__ is the same list and `from decisionrl import PPO` still resolves - and a TYPE_CHECKING block keeps the static imports so type checkers and IDEs see what the runtime serves. import decisionrl.envs drops from ~1.9s to ~0.2s, the remainder being NumPy, and the three modules above now import with torch absent entirely. Touching anything that trains still imports torch, on first use. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(evolution): seed the environment so a seeded run is reproducible NeuroevolutionAgent passed its seed to the optimizer's search and to BaseAgent's RNG, but never to the environment. `_fitness` only ever called `env.reset()` unseeded, and an unseeded env draws its start states from OS entropy - so the rollout returns that *are* the fitness signal were random every run, and `seed=0` bought nothing. Every other agent already seeds the env once at the top of its own `learn`; this one didn't. That is what made test_neuroevolution_cem_solves_cartpole fail on unrelated pull requests, most recently the Dockerfile bump in #13: with the run irreproducible, `assert mean_return > 300.0` was an assertion about luck. Seeding the env exposes what the method actually does at this budget. Across seeds 0-3 CEM returns roughly 283 / 105 / 241 / 97 against a 500-step ceiling, with a random policy at 23.5 - it beats random by a wide margin but does not reliably solve CartPole. So the test now says that instead: the median of three seeds against the measured random-policy floor, renamed to match the claim. A second, fast test pins the reproducibility this commit restores. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat!: make PyTorch optional, and hold the advertised counts to the code Three strands of maintenance that share the same files (pyproject.toml and the README), so they land together. PyTorch is now an extra rather than a hard requirement. The lazy imports added in the previous commit made this possible; this makes it real. `pip install decisionrl` now installs NumPy alone and gives you the environments, the classical baselines, the solvers and the core API - which is what a consumer that only simulates or evaluates needs, and it no longer pays a multi-gigabyte wheel to get it. `decisionrl[torch]` installs the half that trains, and `[dev]` carries torch so contributor setup is unchanged. Reaching a torch-backed name without it now raises a ModuleNotFoundError naming the attribute asked for and the command that fixes it, instead of a bare "No module named 'torch'" from somewhere inside the package; decisionrl/_lazy.py holds that, and only torch gets the rewritten message, so any other missing module still surfaces as itself. The advertised counts disagreed with the package and with each other. CITATION.cff claimed twenty-two environments where twenty-four ship; the README, the packaging description and the citation file all said 31 algorithms where 32 concrete agents are exported - a number matching no consistent definition, since the algorithms subpackage holds 30 classes of which two are abstract bases. All three now read 32 algorithms and 24 environments, 9 of them applied, and tests check them against the package rather than against each other. The applied subset is named in decisionrl.envs.APPLIED_ENVIRONMENTS instead of counted by hand, and CITATION.cff gains the version, date-released and type fields it was missing. Python 3.13 joins the CI matrix and the classifiers: the matrix stopped at 3.12 while the serving image is being bumped to 3.14, so the version we claim to support and the versions we test had drifted apart. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: stop describing PyTorch as a core dependency The index still said "only NumPy + PyTorch in the core" and offered a single install command, both of which stopped being true when torch became an extra. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps python from 3.12-slim to 3.14-slim.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)