[Bugfix] Prevent build_engine_args_dict from mutating stage_config.engine_args (#6783)
Signed-off-by: Arifuzzamanjoy <s1710374103@ru.ac.bd>
This commit is contained in:
1 parent
0288c3f56e
commit
3cddda9781
2 files changed
+146
-1
No files matched your search
@@ -1293,7 +1293,7 @@ def build_legacy_engine_args_dict(
|
||||
cli_tokenizer: str | None = None,
|
||||
) -> dict[str, Any]:
|
||||
"""Implement engine-argument building for the legacy stage representation."""
|
||||
engine_args_dict = _to_dict(stage_config.engine_args)
|
||||
engine_args_dict = copy.deepcopy(_to_dict(stage_config.engine_args))
|
||||
# Legacy configs can materialize an omitted optional TP size as None.
|
||||
# Remove it from the detached adapter dict so the backend default applies
|
||||
# without mutating stage_config.engine_args.
|
||||
|
||||
Reference in new issue
Block a user