Skip to content

Remove init from filter#265

Merged
SamDuffield merged 6 commits into
mainfrom
remove-init-from-filter
Jul 4, 2026
Merged

Remove init from filter#265
SamDuffield merged 6 commits into
mainfrom
remove-init-from-filter

Conversation

@SamDuffield

Copy link
Copy Markdown
Contributor

Closes #253

Currently just an early draft to get feedback before fixing the tests etc.

An alternative to #264, instead of adding an optional init_state arg we make it compulsory and force the user to initiate the state.

This has slightly less flexibility but doesn't add an optional arg and leaves the user with one and only one way to do it.

I've left model_inputs in init_prepare, in many cases they might not be needed although the user would still be required to provide e.g. a None. But this change does provide a nice feature in that the shapes of the init_model_inputs and filter_model_inputs no longer need to match which is convenient in the majority of cases.

@SamDuffield SamDuffield marked this pull request as ready for review July 3, 2026 14:25
@SamDuffield SamDuffield added the refactor Modify the API (for good reason) label Jul 3, 2026

@Sahel13 Sahel13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We can sort out the issue with model_inputs to init_prepare in another PR, and simplify init_prepares along the way (for the user).

Comment thread cuthbert/factorial/README.md Outdated
Co-authored-by: Sahel Iqbal <sahel13miqbal@proton.me>
@SamDuffield SamDuffield merged commit c30e2bf into main Jul 4, 2026
2 checks passed
@SamDuffield SamDuffield deleted the remove-init-from-filter branch July 4, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Modify the API (for good reason)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove init_prepare from filtering function?

2 participants