Skip to content

Conversation

@ricardoV94
Copy link
Member

Closes #1796

@ricardoV94 ricardoV94 added the bug Something isn't working label Dec 21, 2025
# This helper eagerly skips the Scan if n_steps is known to be 1
single_step_requested = False
if isinstance(n_steps, float | int):
if isinstance(n_steps, int | float):
Copy link
Member Author

Choose a reason for hiding this comment

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

reordered, just because ints are much more likely than float

raise ValueError(error_msg)


def isNaN_or_Inf_or_None(x):
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is silly. If anybody disagrees let me know

Copy link
Member

Choose a reason for hiding this comment

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

Overriding a bad user input by guessing what he probably meant (by falling back to the sequence length and ignoring n_steps) was always an anti-pattern, so I like removing this.

@ricardoV94 ricardoV94 changed the title Fix scan new api output ordering Fix output ordering in new Scan API Dec 21, 2025
Internally Scan places those outputs to the right of nit_sot. Helper function reordering to match user definition was not handling this correctly
@ricardoV94 ricardoV94 force-pushed the fix_scan_new_api_output_ordering branch from 46feb7f to 1d9d51e Compare December 21, 2025 14:33
@ricardoV94 ricardoV94 merged commit 5c350ab into pymc-devs:main Dec 21, 2025
12 of 13 checks passed
@ricardoV94 ricardoV94 deleted the fix_scan_new_api_output_ordering branch December 21, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working scan

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scan new API does not respect user-defined ordering of mapped (None) outputs and non-traceable SIT-SOT

2 participants