Skip to content

fix(core): pass processing arguments without a custom entrypoint in local mode - #6425

Open
AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/local-processing-arguments-without-entrypoint
Open

AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/local-processing-arguments-without-entrypoint

Conversation

@AkshayShah03

Copy link
Copy Markdown

Issue #, if available: N/A

Description of changes:

For local processing jobs, _SageMakerContainer._create_docker_host appends container_arguments to host_config["entrypoint"]:

if self.container_entrypoint:
    host_config["entrypoint"] = self.container_entrypoint
if self.container_arguments:
    host_config["entrypoint"] = host_config["entrypoint"] + self.container_arguments

host_config["entrypoint"] is only set when a container_entrypoint is given. The API allows ContainerArguments without ContainerEntrypoint, in which case the image's own entrypoint runs. A local-mode processing job with arguments but no entrypoint therefore fails with KeyError: 'entrypoint'.

This change passes the arguments as the compose command when there's no custom entrypoint, so they reach the image's entrypoint. Behaviour with an entrypoint is unchanged.

Testing:

  • New parametrized test_create_docker_host_processing_entrypoint_and_arguments, covering arguments only, entrypoint only, and both. The arguments-only case fails before this change.
  • tests/unit/local: 179 passed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…ocal mode

For local processing jobs, _create_docker_host appended container_arguments
to host_config['entrypoint'], which is only set when a container_entrypoint
is given. A processing job with arguments but no entrypoint (valid in the
API: ContainerArguments without ContainerEntrypoint runs the image's own
entrypoint) therefore failed with KeyError: 'entrypoint'.

When there is no custom entrypoint, pass the arguments as the compose
'command' so they reach the image's entrypoint.

This branch had an error being deployed

1 failed deployment
manual-approval — 25b3471e Deployed Oct 10, 2026 by AkshayShah03 via wait-for-approval #1701
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