Skip to content

fix(models): restore loading of saved models - #207

Merged
AnderBiguri merged 1 commit into
CambridgeCIA:mainfrom
TimLeach635:fix/model-loading
Sep 29, 2026
Merged

AnderBiguri merged 1 commit into
CambridgeCIA:mainfrom
TimLeach635:fix/model-loading

Conversation

@TimLeach635

Copy link
Copy Markdown
Contributor

The code was written by AI, but I'm writing this PR message by hand.

Continuing the theme of some AI-assisted small bug fixes, Claude noticed that a recent PR (#188) broke the load() function for models – load() uses LIONParameter, but that PR enforces LIONModelParameter.

This fixes the error, by making load() use LIONModelParameter for consistency, and adds some tests for load() and save() to guard against future regression.

Convert loaded model parameters to LIONModelParameter, stop its defaults
overwriting passed-in values, and fall back to CPU when loading without
CUDA. Adds save/load round-trip tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@AnderBiguri
AnderBiguri merged commit abbe919 into CambridgeCIA:main Sep 29, 2026
1 check passed
@TimLeach635
TimLeach635 deleted the fix/model-loading branch October 12, 2026 09:55
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.

3 participants