fix: add chunk overlap param#94
Open
Mateusz-Switala wants to merge 7 commits into
Open
Conversation
Signed-off-by: Mateusz Switala <mswitala@redhat.com> Assisted-by: Claude Code
Signed-off-by: Mateusz Switala <mswitala@redhat.com> Assisted-by: Claude Code
Signed-off-by: Mateusz Switala <mswitala@redhat.com> Assisted-by: Claude Code
filip-komarzyniec
approved these changes
Jul 7, 2026
filip-komarzyniec
left a comment
Collaborator
There was a problem hiding this comment.
Looks great 🙌🏼 /lgtm
Signed-off-by: Mateusz Switala <mswitala@redhat.com> Assisted-by: Claude Code
Signed-off-by: Mateusz Switala <mswitala@redhat.com> Assisted-by: Claude Code
Signed-off-by: Mateusz Switala <mswitala@redhat.com> Assisted-by: Claude Code
Signed-off-by: Mateusz Switala <mswitala@redhat.com>
Comment on lines
+260
to
+265
| valid_combinations = search_space.combinations | ||
| if not valid_combinations: | ||
| _logger.warning("No valid combinations remain after applying search space rules.") | ||
| non_model_keys = [p.name for p in search_space.params if p.name not in ("foundation_model", "embedding_model")] | ||
| verbose_repr: dict[str, Any] = { | ||
| k: v.all_values() | ||
| for k, v in search_space._search_space.items() # pylint: disable=protected-access | ||
| if k not in ("foundation_model", "embedding_model") | ||
| key: list(dict.fromkeys(combo[key] for combo in valid_combinations)) for key in non_model_keys |
Collaborator
There was a problem hiding this comment.
I'm pretty sure the new implementation for creating the verbose_repr is worse in terms of time-complexity.
I asked Claude to calculate that and here's the detailed breakdown:
Whereas the previous implementation is simply O(P), where P is the number of parameters in the search space.
Why did we have to refactor that at all?
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.
Assisted-by: Claude Code
Description
Add chunk_overlaps param to the prepare_search_space_report component. The chunk size (chunk_size) and chunk overlap (chunk_overlap) are related by certain rules, which means that passing a custom list of chunk sizes with default overlaps can result in empty search spaces.
Motivation
Why is this change needed?
Changes
Testing
How did you test this?
Checklist