Repository navigation
Conversation
plant.stream resolved the whole plant again, outside jit, on every call to ask whether the stream carries an indicator-organism density. The one vectorized sweep now collects that density beside the temperature, so a sequence of reads costs one reconstruction: a held BSM2 evaluation (17 stream reads, each with the digester's pH solve) drops from about 150 s to 23 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On three held states of a bypass plant: the OCI is the published sum of the components the wrapper returns, and the effluent BOD is the flow-weighted mix of the treated overflow and the bypassed influent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cached sweep holds the streams, their temperatures and their organism densities since the sweep took over the organism read; the test that inspects the cache unpacked two. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
The fast gate's only failure on 940cdaa is the The earlier shard failure on fdbf041 was this PR's: Generated by Claude Code |
This branch has not been deployed
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.
Part of #1036: the coverage follow-up to #1093. What remains of #1036 is step 3 (the
evaluatestudy kind) and step 4 (the docs page).Summary
plant.streamtakes a stream's indicator-organism density from the cached sweep. Each call used to resolve the whole plant again, outside jit, to ask whether the stream carries an organism density. That is a fixed property of the plant's structure. The one vectorized sweep now collects the density beside the temperature, and_reconstruct_stream_orgis gone (plant.pyis 31 lines shorter). For a plant whose digester solves its pH in every resolve, this was the bulk of the cost: anevaluate_bsm2on three held states read 17 streams in 148 s, and now takes 23 s. Almost all of the 23 s is one compile of the sweep.A fast-tier test of the
evaluate_bsm2wrapper. It runs on three held states of a bypass plant, in about 18 s, and checks two things against formulas written out in the test:Before this, only the slow suite covered the wrapper.
Things a reviewer should know
full-cilabel: the change is inplant/plant.py.evaluate_bsm2stay covered by the slow suite alone: an explicitly giveneffluent_port, and a plant without a bypass. Covering them in the fast tier would add a second BSM2 compile.Testing
tests/unit: 2886 passed.test_bsm2_evaluation(the fast tests),test_disinfection,test_recycle_cached_map,test_performanceandtests/unit/test_mixed_scalars.pyall passed. The organism and temperature stream tests are among them.scripts/check_types.pyandscripts/check_test_integrity.pyare clean.Patch coverage
100% of 11 changed lines.
Generated by Claude Code