Repository navigation
refactor: share the teacher-forced predict loop - #573
MartinuzziFrancesco wants to merge 1 commit into
Conversation
predict(::AbstractLuxLayer) and __predict(::Any, ::AbstractReservoirComputer) now use one __teacher_forced_predict; the Lux-layer path iterates eachcol views instead of copying data[:, t]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR: #573 Reviewed head: fbf23ba Risk assessment
Review reportVERDICT: CHANGES Riskhigh (H1: existing public predict calls with Vector-only wrapped functions are rejected after columns become views) Blocking findings
[P2] Preserve copied-column semantics for generic Lux callers
Confirmed by running both implementations with the same installed package and inputs:
Keep the generic Lux path's owned-column behavior while sharing the loop, and add regression tests for input preservation and concrete-vector function dispatch. The existing reservoir-computer fallback already uses views; its behavior need not change. Non-blocking findingsNone. What I ranAll Julia commands preserved the supplied layered
This independent review was produced by an AI agent using codex-cli 0.164.0, model gpt-6.1-sol; local session 01a1d258-58fb-7ae2-94a9-460bf7423820 (no session URL). What I did not verify
AUTHOR_GRADE: {"task":"other","score":2,"difficulty":2,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"Small loop refactor passes all 3924 existing assertions, but independent base/head probes confirm caller-data mutation and rejection of formerly working Vector-only wrapped functions; no tests cover the changed input semantics."} Head link: fbf23ba 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
predict(::AbstractLuxLayer) and __predict(::Any, ::AbstractReservoirComputer) now use one __teacher_forced_predict; the Lux-layer path iterates eachcol views instead of copying data[:, t].
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.