Repository navigation
fix(autogen-ext): preserve Docker GPU requests in config - #8140
Open
YZJF (YZJF) wants to merge 1 commit into
Open
YZJF (YZJF) wants to merge 1 commit into
YZJF (YZJF) wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Why are these changes needed?
DockerCommandLineCodeExecutorsupports Dockerdevice_requestsat runtime and passes them tocontainers.create, but its component configuration omitted the field. Restoring an executor from component configuration therefore silently drops GPU device requests.This adds a JSON-compatible optional config field, serializes each Docker
DeviceRequestto its API mapping, and reconstructs it when loading the component. The regression test covers the supporteddump_component()/load_component()path for a GPU request.Related issue number
N/A — there is no matching open issue or pull request. #6339 added runtime GPU support but did not serialize the existing option.
Checks
Local validation:
uv run --no-sync pytest packages/autogen-ext/tests/code_executors/test_docker_commandline_code_executor.py -q— 16 passeduv run --no-sync ruff format --checkanduv run --no-sync ruff checkon both changed filesmypyandpyrighton both changed filesuv run --no-sync poe fmt --checkanduv run --no-sync poe lintinpackages/autogen-extPackage-wide
poe mypyandpoe pyrightwere also attempted. In the focused Docker test environment they report existing failures from unrelated optional integrations that are not installed; neither reported a finding in the two changed files.AI assistance
AI assistance was used to investigate the defect and prepare the patch and regression test. The submitted diff, production path, duplicate check, and local test results were independently reviewed.