Skip to content

fix: jumpstart estimator for gated uncompressed training #5175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

evakravi
Copy link
Member

@evakravi evakravi commented May 13, 2025

Issue #, if available:

Description of changes:

  • This PR fixes an issue with JumpStartEstimator not including the model channel when invoking CreateTrainingJob
  • This PR also adds support for accept_eula field in base Estimator class, and added support for setting low-level field accordingly.

Testing done:

  • Unit tests added and updated
  • Integration tests pass
  • Tested workflow locally
  • TO-DO: Add integration test for gated uncompressed training once artifacts and metadata are in production

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • I have read the CONTRIBUTING doc
  • I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the Python SDK team
  • I used the commit message format described in CONTRIBUTING
  • I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
  • I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • I have checked that my tests are not configured for a specific region or account (if appropriate)
  • I have used unique_name_from_base to create resource names in integ tests (if appropriate)
  • If adding any dependency in requirements.txt files, I have spell checked and ensured they exist in PyPi

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@evakravi evakravi requested a review from a team as a code owner May 13, 2025 15:21
@evakravi evakravi requested a review from rsareddy0329 May 13, 2025 15:21
benieric
benieric previously approved these changes May 14, 2025
data_source = train_args["InputDataConfig"][idx]["DataSource"]
if "S3DataSource" in data_source:
s3_data_source = data_source["S3DataSource"]
if "ModelAccessConfig" not in s3_data_source:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who sets this ModelAccessConfig? Is it the default artifacts set by JumpStart or is it something user would explicitly add to their inputs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's set by us when the customer inputs accept_eula=True

@@ -2674,6 +2695,36 @@ def _add_spot_checkpoint_args(cls, local_mode, estimator, train_args):
raise ValueError("Setting checkpoint_local_path is not supported in local mode.")
train_args["checkpoint_local_path"] = estimator.checkpoint_local_path

@classmethod
def _set_accept_eula_for_model_channel_input_data_config(cls, train_args, accept_eula):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qq- I know @Narrohag added some code that does something very similar. I want to make sure we're not doing the same work twice

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm not fully following why this extra accept_eula logic is needed. For reference Evan this is where I added most of the model access config logic: https://github.com/aws/sagemaker-python-sdk/pull/5070/files. I'll take a closer look in a bit and maybe we can chat about it today

@evakravi evakravi closed this May 16, 2025
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.

4 participants