Skip to content

refactor(search_space): move report builder to prepare package - #130

Merged
jakub-walaszczyk merged 1 commit into
mainfrom
remove-search-space-component-code
Aug 20, 2026
Merged

refactor(search_space): move report builder to prepare package#130
jakub-walaszczyk merged 1 commit into
mainfrom
remove-search-space-component-code

Conversation

@jakub-walaszczyk

@jakub-walaszczyk jakub-walaszczyk commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

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.

  • 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.

Motivation

This is a part of moving component's code back to the pipelines-components.
ai4rag should contain all the utils, but after all the code calls should be in the component body.

Testing

How did you test this?

Checklist

  • Tests added/updated
  • Documentation updated
  • Code follows style guide
  • All checks passing

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
@jakub-walaszczyk jakub-walaszczyk changed the title refactor(search_space)move report builder to prepare package refactor(search_space): move report builder to prepare package Aug 20, 2026
@jakub-walaszczyk
jakub-walaszczyk merged commit 56d4040 into main Aug 20, 2026
4 checks passed
@jakub-walaszczyk
jakub-walaszczyk deleted the remove-search-space-component-code branch August 20, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant