Skip to content

SciML linting - allow nn outputs not in params table - #511

Merged
BSnelling merged 5 commits into
mainfrom
bes/nns_observable_linting
Aug 13, 2026
Merged

SciML linting - allow nn outputs not in params table#511
BSnelling merged 5 commits into
mainfrom
bes/nns_observable_linting

Conversation

@BSnelling

Copy link
Copy Markdown
Collaborator

Allow network outputs to be used in observable and noise formulae without having to appear in the parameters table. The PR updates the get_required_parameters_for_parameter_table check to reflect this.

@BSnelling
BSnelling requested a review from a team as a code owner August 13, 2026 08:33
@codecov-commenter

codecov-commenter commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.80%. Comparing base (f1c7679) to head (6727939).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #511      +/-   ##
==========================================
+ Coverage   75.61%   75.80%   +0.18%     
==========================================
  Files          65       65              
  Lines        7354     7357       +3     
  Branches     1323     1323              
==========================================
+ Hits         5561     5577      +16     
+ Misses       1289     1280       -9     
+ Partials      504      500       -4     

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

@dweindl dweindl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good after gating on SciML-usage and not hiding the import error.

Comment thread petab/v2/lint.py Outdated
try:
from .extensions.sciml_lint import get_nn_entity_petab_ids
except ImportError:
pass

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pass doesn't feel safe. I think get_nn_entity_petab_ids should only be imported/called if problem required SciML, but then, any import failure should be an error.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I've updated accordingly.

@dweindl dweindl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dilpath dilpath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but I think the wording is a bit suboptimal. NN outputs should never appear in the parameter table, right? But currently the PR seems to imply that there are cases where it is OK

@BSnelling

Copy link
Copy Markdown
Collaborator Author

Looks good but I think the wording is a bit suboptimal. NN outputs should never appear in the parameter table, right?

I thought this was the case, but wasn't 100% sure. I have updated the wording now to say they should not appear.

Comment thread tests/v2/test_sciml.py Outdated
BSnelling and others added 2 commits August 13, 2026 12:31
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
@BSnelling
BSnelling merged commit 6629df6 into main Aug 13, 2026
13 checks passed
@BSnelling
BSnelling deleted the bes/nns_observable_linting branch August 13, 2026 12:44
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.

4 participants