Repository navigation
fix(core): let remote Spark jobs use pre_execution_script - #6448
Open
AkshayShah03 wants to merge 1 commit into
Open
AkshayShah03 wants to merge 1 commit into
AkshayShah03 wants to merge 1 commit into
Conversation
aws#5816 made _JobSettings add the sagemaker-feature-store-pyspark install and JAR-copy commands to pre_execution_commands for Spark jobs, before the check that only one of pre_execution_commands and pre_execution_script is set. So @Remote(spark_config=SparkConfig(), pre_execution_script=...) always failed with 'Only one of pre_execution_commands or pre_execution_script can be specified!' although the user set only the script (this worked in v2). The commands were also appended to the caller's own list in place. Check the user's configuration before adding the Spark commands; when a script is set, leave the setup to it (with a warning), and append the commands to a copy of the user's list.
AkshayShah03
requested a deployment
to
manual-approval
October 12, 2026 18:00 — with
GitHub Actions
Waiting
AkshayShah03
requested a deployment
to
manual-approval
October 12, 2026 18:00 — with
GitHub Actions
Waiting
AkshayShah03
requested a deployment
to
manual-approval
October 12, 2026 18:00 — with
GitHub Actions
Waiting
This branch is waiting to be 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.
Issue #, if available: N/A
Description of changes:
#5816 made
_JobSettingsadd thesagemaker-feature-store-pysparkinstall and JAR-copy commands topre_execution_commandsfor Spark jobs. They are added before the check that only one ofpre_execution_commandsandpre_execution_scriptis set. So@remote(spark_config=SparkConfig(), pre_execution_script="setup.sh", ...)always fails with
ValueError: Only one of pre_execution_commands or pre_execution_script can be specified!, even though the user only set the script. This worked in v2. The commands were also appended to the caller's ownpre_execution_commandslist in place.This change:
sagemaker-feature-store-pysparkisn't installed automatically;Testing:
_JobSettingstests:tests/unit/remote_function: 233 passed.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.