Skip to content

fix: clarify TemplateExpressionSpec reload errors#1210

Open
MilesCranmerBot wants to merge 2 commits into
astroautomata:masterfrom
MilesCranmerBot:bot/fix-template-reload-error
Open

fix: clarify TemplateExpressionSpec reload errors#1210
MilesCranmerBot wants to merge 2 commits into
astroautomata:masterfrom
MilesCranmerBot:bot/fix-template-reload-error

Conversation

@MilesCranmerBot

Copy link
Copy Markdown
Contributor

Fixes #846.

  • Detect pickled/reloaded TemplateExpressionSpec models
  • Raise a targeted unsupported-reload error for predict/export paths
  • Add regression coverage for the error message

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.21%. Comparing base (beaa405) to head (762cb0c).

Files with missing lines Patch % Lines
pysr/sr.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1210      +/-   ##
==========================================
- Coverage   94.26%   94.21%   -0.05%     
==========================================
  Files          21       21              
  Lines        1690     1694       +4     
==========================================
+ Hits         1593     1596       +3     
- Misses         97       98       +1     

☔ 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.

Closes astroautomata#846

Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@MilesCranmerBot MilesCranmerBot force-pushed the bot/fix-template-reload-error branch from 067b1b2 to 1c60984 Compare June 22, 2026 19:29
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.

Not possible to load a model fitted with TemplateExpressionSpec

1 participant