Repository navigation
Pre-release fixes: AgentLib export of isolated lags, online training, CMNN layers; ruff format - #91
Merged
Conversation
…ing of ModularANN and PCNN, CMNN layers - check_agentlib_compatibility rejects lag groups without lag 0 (e.g. ['u', 'T_lag1']): AgentLib-MPC accepts them but passes the values from lag 0 on (T(k) instead of T(k-1)). physXAI itself keeps isolated lags. - ModularANN.online_pipeline: no warm start for a loaded model (crashed without build context, would overwrite the loaded weights). - PCNN: trained parameters, consistency margin and initial rates are read from the model (constants built into it), not from rates re-estimated on the current data (wrong after online_pipeline on other data). - CMNNModel, PINNModel and px.MonotoneMLP need n_layers >= 1: without a hidden layer the prediction was increasing in every input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ality.yml Only formatting, no change of the code. The ruff version is pinned in quality.yml and .pre-commit-config.yaml, since the formatting can change between ruff versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Open
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.
Fixes from the review of the release candidate (after #90), plus a one-time formatting of the whole code.
Fixes (466eee7)
check_agentlib_compatibilitynow rejects lag groups that do not start at lag 0 (e.g.['u', 'T_lag1']). AgentLib-MPC accepts such configs without an error, but only counts the inputs of a feature and passes its values from lag 0 on: forT_lag1the MPC would feed T(k) instead of T(k-1), and foru_lag1it would passu, u_1(shape mismatch at runtime). physXAI itself still trains with isolated lags (e.g. a dead timeu_lag3); only the export needs the complete group. A contract test documents how AgentLib-MPC translates these configs.ModularANN.online_pipelinewith warm start. With a normalizedpx.Linearholding data-only terms (warm start on by default), the online pipeline crashed (AttributeError, no build context). If it had run, the warm start would have overwritten the loaded weights. A loaded model is now trained further from its own weights.consistency_marginandtd.physics['initial_rates']were computed with initial rates estimated again from the current data, not with the ones built into the loaded model. Reproduced: 3.72 K/h reported, 1.24 K/h in the model. They are now read from the model'sconstant_pcnn_scale_<j>layers.n_layers=0,CMNNModel,PINNModelandpx.MonotoneMLPonly had the non-negative weights of the output layer, so the prediction was increasing in every input, also with monotonicity -1.n_layers >= 1is required now (also checked in the constructor, before the preprocessing).CHANGELOG entries for 1 and 4; 2 and 3 concern features that are new in 1.0.
Formatting (dca1edb, 48249ef)
ruff format(0.17.4) on the package, tests, examples and the code block in the README. Only formatting,ruff checkis still clean.quality.ymlalso runsruff format --check .. The ruff version is pinned there and in.pre-commit-config.yaml(v0.17.4), since the formatting can change between ruff versions.devextra:ruff>=0.17.4..git-blame-ignore-revslists the formatting commit; GitHub skips it in blame automatically (locally:git config blame.ignoreRevsFile .git-blame-ignore-revs).The formatting commit touches 50 files: open PRs based on
refactoring_v1.0.0will conflict and are easiest to reformat before merging.Checks (local, Windows, Python 3.12)
pytest: 272 passed, 1 skipped (RNN contract test, AgentLib-MPCmainwithout RNN support)tests/smoke_examples.py: 13/13 examples OKruff check physXAI tests examples,ruff format --check .: cleansphinx-apidoc+sphinx-build -W, Sphinx 6.2.1): no warnings🤖 Generated with Claude Code