refactor(search_space): move report builder to prepare package - #130
Merged
Conversation
Relocate the search-space report out of the optimization components and into ai4rag.search_space.prepare, placing it next to the model restore path so the model<->spec round-trip lives in one package. - add serialize_model as the write mirror of the get_foundation_models / get_embedding_models restore path - add build_search_space_report(AI4RAGSearchSpace) and slim SearchSpaceReport down to the search_space dict - decouple model pre-selection from report building; it is now an explicit, separate ModelsPreSelector step - delete the old components/optimization/search_space_preparation module - update API reference, user guide, and tests to the new import paths BREAKING CHANGE: prepare_search_space_report and SearchSpaceReport are removed from ai4rag.components.optimization. Build a search space with prepare_search_space_with_maas, then call build_search_space_report from ai4rag.search_space.prepare; SearchSpaceReport no longer carries selected_models, and model pre-selection must be run as a separate step. Signed-off-by: Jakub Walaszczyk <jwalaszc@redhat.com> Assisted-by: Claude Code Signed-off-by: Jakub Walaszczyk <jwalaszc@redhat.com> Assisted-by: Claude Code
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
Relocate the search-space report out of the optimization components and into ai4rag.search_space.prepare, placing it next to the model restore path so the model<->spec round-trip lives in one package.
BREAKING CHANGE: prepare_search_space_report and SearchSpaceReport are removed from ai4rag.components.optimization. Build a search space with prepare_search_space_with_maas, then call build_search_space_report from ai4rag.search_space.prepare; SearchSpaceReport no longer carries selected_models, and model pre-selection must be run as a separate step.
Motivation
This is a part of moving component's code back to the pipelines-components.
ai4ragshould contain all the utils, but after all the code calls should be in the component body.Testing
How did you test this?
Checklist