Repository navigation
Fix: chunking in the new interface - #168
Merged
kzsigmond merged 3 commits intoFeb 20, 2026
Merged
Conversation
rugwed-lokhande
approved these changes
Nov 20, 2025
rugwed-lokhande
left a comment
Contributor
There was a problem hiding this comment.
Pretty straightforward, looks good!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes the calculation of chunk sizes for overlap derivative computations in the impacted modules and adds a new test to verify correct chunking behavior. The main focus is to ensure that chunking is based on the actual size of the s-space rather than the number of parameters.
Refactor chunk calculation logic:
calculate_overlap_deriv_chunksinfanpy/interface/fanci/legacy.py,fanpy/interface/fanci/pyci.py, andfanpy/wfn/utils.pyto use the size of the s-space (self._sspace.shape[0]) instead of the number of active parameters for memory and chunk size calculations, ensuring more accurate and consistent chunking.Testing improvements:
test_norm_constraint_chunkingintests/test_interface_pyci.pyto verify that the norm constraint Jacobian is computed correctly with and without chunking, ensuring the refactored chunking logic produces consistent results.