Skip to content

Read schedules off the clock the rule counts on - #74

Merged
jessegrabowski merged 5 commits into
pymc-devs:mainfrom
jessegrabowski:rules-take-clocks
Aug 10, 2026
Merged

Read schedules off the clock the rule counts on#74
jessegrabowski merged 5 commits into
pymc-devs:mainfrom
jessegrabowski:rules-take-clocks

Conversation

@jessegrabowski

Copy link
Copy Markdown
Member

Handing a rule a schedule as its learning_rate used to substitute it into a rate variable with graph_replace; now the rule reads it off the step clock it already keeps, and compile_train advances that clock once per step. The rate variable the old path published is gone, so reading the applied rate means asking for it as an extra output, and scheduled rules that kept no step count of their own get a new step-count checkpoint key.

compile_train accepts a rule's own advance rather than rejecting it, so a rule's updates keep advancing their counter when compiled directly instead of through compile_train.
The applied rate is an expression over the clock now, so there is no rate variable to publish it to; ask for it as an extra output instead.
Every rule already counted its steps under the name its alias asks for, so the two-clock case the weaker assertion allowed for cannot arise.
The old bound passed with the clock at 1, where the rate is 0.9998, so it did not distinguish an advancing clock from a frozen one.
@codecov-commenter

codecov-commenter commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.67%. Comparing base (0b90752) to head (010c8e1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
- Coverage   93.77%   93.67%   -0.10%     
==========================================
  Files          45       45              
  Lines        1783     1756      -27     
==========================================
- Hits         1672     1645      -27     
  Misses        111      111              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jessegrabowski
jessegrabowski merged commit 10aae8a into pymc-devs:main Aug 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants