You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add genie_overrides to QairtEncapsulation for GenAIConfig customization (microsoft#2469)
Introduce a `genie_overrides` PassConfigParam that deep-merges
user-supplied fields into the GenAIConfig before `LLMContainer.export()`
bakes them into the Genie DLC. This allows callers to override any
GenAIConfig field (engine config, positional encoding, etc.) without
modifying `QairtGenAIBuilder` or `QairtPipelinePass`.
Nested dicts are merged recursively so only the specified keys are
changed; all other values set by the upstream builder pass are
preserved.
## Describe your changes
Add a `genie_overrides` parameter to `QairtEncapsulation`. When
provided, the value is deep-merged into the `GenAIConfig` dict just
before `LLMContainer.export()` is called. The merge is recursive: nested
dicts are merged key-by-key so callers only need to specify the fields
they want to change. A helper `_deep_merge` utility handles the
recursion and is unit-tested directly. Integration tests cover
round-trip behavior with nested overrides and verify that unrelated
config fields are left untouched.
## Checklist before requesting a review
- [x] Add unit tests for this change.
- [x] Make sure all tests can pass.
- [x] Update documents if necessary.
- [x] Lint and apply fixes to your code by running `lintrunner -a`
- [x] Is this a user-facing change? If yes, give a description of this
change to be included in the release notes.
**Release note:** `QairtEncapsulation` now accepts `genie_overrides`,
`backend_extensions_overrides`, and `engine_config_overrides` parameters
that allow users to override the behavior of underlying Genie components
when building Genie DLCs.
## (Optional) Issue link
N/A
0 commit comments