Repository navigation
documentation: reverting SageMaker distributed data parallel EFA doc updates - #2323
Merged
Merged
Conversation
added 4 commits
May 4, 2021 15:18
This reverts commit 6d39762.
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
icywang86rui
approved these changes
May 5, 2021
Evan-W-ang
added a commit
to Evan-W-ang/sagemaker-python-sdk
that referenced
this pull request
Jun 8, 2026
gwang111
added a commit
to gwang111/sagemaker-python-sdk
that referenced
this pull request
Nov 14, 2026
* fix(codegen): restore codestyle-doc-tests compliance after botocore sync (aws#6523) * fix(codegen): avoid double blank line before logger in resources.py The generated sagemaker-core resources.py had two blank lines between the import block and the module logger, which black collapses to one — failing codestyle-doc-tests (sagemaker-core) black-check. The import block ends with "\n\n" and LOGGER_STRING began with a leading newline, so together they emitted the extra blank line. - tools/constants.py: drop the leading newline from LOGGER_STRING so regenerated resources.py is black-clean (durable fix; prevents the next daily Botocore sync from reintroducing it). - resources.py: reformat the currently-committed file to match. * fix(codegen): restore module docstrings in config_schema and shape_dag The daily Botocore sync (aws#6520) regenerated config_schema.py and shape_dag.py without their module docstrings, failing codestyle-doc-tests (sagemaker-core) docstyle (pydocstyle D100: missing docstring in public module). - config_schema.py / shape_dag.py: restore the module docstrings. - tools/resources_codegen.py / tools/shapes_extractor.py: emit the module docstring when generating these files so future daily syncs stay docstyle-clean (durable fix). --------- Co-authored-by: Roja Reddy Sareddy <rsareddy@amazon.com> * style(data_preparer): format DataPreparer files with black Run black 26.3.1 (the version pinned in requirements/tox) over the DataPreparer files that black-check flags, so the codestyle check passes on master. Formatting only: black's safe mode verified each file's AST is unchanged, and the unit suites give identical results before and after. No files outside this change are touched. --- X-AI-Prompt: Make the DataPreparer port pass public master's codestyle checks X-AI-Tool: Kiro * test(data_preparer): keep internal names out of the redaction guard The redaction guard listed the internal names it bans as plain regexes, so shipping it would publish them. Store those names only as SHA-256 hashes of a normalized key: identifier names match any CamelCase or underscore run inside one token (any case), phrases match consecutive words. Generic patterns (Java file references, *.aws.internal principals, account IDs, preview-era wording) stay as regexes. All 34 cases from the previous self-tests give the same result under the new matcher. The self-tests now exercise the matching rules with stand-in terms patched into the hash sets, so the file names nothing internal. Also reword an internal term in a test_preparer.py comment. --- X-AI-Prompt: Make the DataPreparer port safe and passing for the public PR X-AI-Tool: Kiro * test(data_preparer): run job-submitting integ suites on scheduled CI Mark the DataPreparer integration modules that submit jobs and wait for them (attach, SDG happy path, DT happy path, DT operators) as gpu_intensive, the repo's marker for tests that consume real capacity. PR checks deselect it. The cheap modules still run on PRs: schema validation (fails client-side before submission), stop (submit then stop) and the env-gated short-version attach. --- X-AI-Prompt: Make the DataPreparer port safe and passing for the public PR X-AI-Tool: Kiro * style(data_preparer): fix flake8 and pydocstyle findings Fix what public master's codestyle checks flag in DataPreparer code: - flake8: unused imports and a dead local (plus its comments about service internals), ambiguous names, over-long lines, a TYPE_CHECKING import for the Table annotation, and a duplicate DataPreparer key in sagemaker-core's config schema (identical values). - pydocstyle: one-line summaries for multi-line docstrings, and docstrings on the concrete DQ shape extractors. - Sphinx: fix an indentation error in the DatasetJobConfig docstring and the attach() Returns list, and link the schema reference page from the Data Preparation toctree. No behavior change; unit suites unchanged. --- X-AI-Prompt: Make the DataPreparer port pass public master's codestyle checks X-AI-Tool: Kiro * chore(data_preparer): remove KmsKeyId from SDG + DQ (aws#2347) * chore(data_preparer): remove KmsKeyId from SDG + DQ Drop the OutputDataConfig.KmsKeyId doc section, the stale schema fixture entry, and swap SDG-shaped unit-test fixtures to HubName. Ported from master-data-preparation 817c66527 (aws/sagemaker-python-sdk-staging#2347). The golden notebook hunk is left out; notebooks follow in a separate PR. --- X-AI-Prompt: Port the KmsKeyId removal (aws#2347) onto the public-readiness branch X-AI-Tool: Kiro * feat(data-preparer): default DataQualityEvaluation to 3.0.0 (aws#2365) * feat(data-preparer): default DataQualityEvaluation to 3.0.0 Raise the DQ schema-version ceiling to 3, so an unpinned evaluate() resolves 3.0.0 wherever the service shows it to the account and 2.0.0 where it does not. Explicit version pins still resolve as before. Look up a DQ job's progress file only in that job's own output folder, from its name and creation time: the 3.x layout {S3OutputPath}/data-quality-evaluation/{JobName}/{createdAt}/, then the 2.x layout {S3OutputPath}/{JobName}-{createdAt}/. The broad listing fallback could lock onto an earlier job that reused the name. Move the unpinned v2-shaped DQ integ test and the DQ doc examples to the 3.0.0 shape, and read outputs through MetadataS3Uri in the tutorial. * test(data-preparer): move the SDG-then-DQ integ test to the 3.0.0 shape TestSDGThenDQ submits an unpinned DQ request, which now resolves 3.0.0, so it sends Operations [default_metrics] instead of the v2 evaluation_name. The docstring no longer assumes the v2 output-folder layout. Ported from master-data-preparation 6fe2a49b9 (aws/sagemaker-python-sdk-staging#2365). Its MetadataS3Uri lookup replaces this branch's paginated listing of S3OutputPath for locating DQ records, so that listing, its constant and its tests are removed. Formatted with black; two unused test imports dropped. --- X-AI-Prompt: Port the DQ 3.0.0 default (aws#2365) onto the public-readiness branch X-AI-Tool: Kiro * chore(data_preparer): disable DataPreparer.analyze() Remove the public analyze() method from DataPreparer so GapAnalysis is not exposed in this release. The implementation (_analyze_impl) and JobCategory.GAP_ANALYSIS are kept, so re-enabling is a one-line change: restore `analyze = _DualCallable(_analyze_impl)`. Tests that call analyze() are skipped rather than changed, and can be un-skipped when the method is re-enabled. The category-mismatch error message and the module docstring no longer mention analyze(). Ported from aws/sagemaker-python-sdk-staging#2323 (29aab8050, not yet merged there). Conflicts resolved against this branch: the preparer module docstring keeps its one-line summary, and the integ skip marker sits after the DQ preview assertions. --- X-AI-Prompt: Disable GapAnalysis for the public release by porting aws#2323 X-AI-Tool: Kiro * test(data_preparer): pin analyze() as not exposed while GapAnalysis is off aws#2323 skips the analyze() tests but nothing fails if analyze is exposed again by accident. Assert DataPreparer (class and instance) has no analyze attribute, that generate/evaluate/transform/attach/stop remain, and that the category-mismatch error no longer points callers to analyze(). Two of the three fail with analyze exposed. --- X-AI-Prompt: Disable GapAnalysis for the public release by porting aws#2323 X-AI-Tool: Kiro * test(train): make SFT recipe-override integ tests recipe-proof (aws#6548) * test(train): make SFT recipe-override integ tests recipe-proof The canaries-v3-master (sagemaker-train) job started failing after the JumpStart Hub SFT recipe for meta-textgeneration-llama-3-2-1b-instruct was updated (hub content 2.17.0 / template v1.0.3): training_args nesting was removed, max_len renamed to dataset_max_len, the default learning_rate changed, and some validation bounds were relaxed. The SFT recipe-override integ tests pinned the old recipe shape/values, so they broke with no SDK or test change. Remove the 15 structure-pinning SFT tests; their merge/override/flatten/ validation behavior is already covered Hub-independently by the pinned- fixture unit tests in tests/unit/train/test_recipe_resolver.py. Add a schema-agnostic llama-SFT serverless test mirroring the existing RLVR and Nova serverless tests: keys are discovered dynamically from the live Hub spec and overrides are asserted by value, so the test survives future recipe/version drift. Leave the already recipe-proof suites (ModelTrainer local-recipe, evaluator, RLVR/Nova serverless) untouched. * test(train): assert override flows into resolved recipe, not serverless HP The scoped CodeBuild run surfaced that asserting override flow through the serverless-filtered hyperparameters is wrong for renamed-leaf keys (e.g. dataset_max_len -> training_config.data.max_length): the serverless path in _apply_recipe_to_hyperparameters filters flattened recipe leaf names against user-provided spec names, so renamed-leaf overrides are dropped. Assert override application against the resolved recipe (the resolver's contract) instead, keeping the test recipe-proof and leaf-name-agnostic. The serverless drop of renamed-leaf overrides is a separate SDK issue to be raised with the recipe owners. --------- Co-authored-by: rsareddy0329 <rsareddy@amazon.com> --------- Co-authored-by: rsareddy0329 <rsareddy0329@gmail.com> Co-authored-by: Roja Reddy Sareddy <rsareddy@amazon.com> Co-authored-by: Prarthana Rajapurohit <90079998+prar1907@users.noreply.github.com> Co-authored-by: Dokyung Yang <67037733+dokker19@users.noreply.github.com> Co-authored-by: Nutan Nara <nutanara@amazon.com> (cherry picked from commit 4b2aa3e42d1120b2a268a3bb8700561c5a4212f5)
gwang111
added a commit
to gwang111/sagemaker-python-sdk
that referenced
this pull request
Nov 14, 2026
Builds on aws#2323 (Nutan Nara), which hid DataPreparer.analyze() but kept the GapAnalysis code for a one-line re-enable. The package source and repo are public, so remove it entirely for this release: - preparer.py: _analyze_impl, the GapAnalysis branches in attach() and _run, the re-enable comment, and the attach() docstring mention. - constants.py: JobCategory.GAP_ANALYSIS and its schema-version ceiling. - sagemaker-core telemetry: the RecommendationResult ARN mapping. - tests: test_analyze.py, the GapAnalysis test in test_preparer.py and the integ test_03_analyze_gaps (and its env vars); the empty-output test now uses an unrecognized category string. attach() now rejects a job ARN whose category DataPreparer does not support with a ValueError listing the supported ones, before any service call; previously it reached DescribeJob and then failed on the enum lookup. The redaction guard bans the GapAnalysis names (hashed) and now also scans the DataPreparer unit tests for hashed internal names. master-data-preparation keeps GapAnalysis for a later release. --- X-AI-Prompt: Fully redact GapAnalysis/analyze from the public release branch, starting from Nutan's aws#2323 X-AI-Tool: Kiro (cherry picked from commit 2600542839c06b178f2bf99c13a7d21f260e1095)
gwang111
added a commit
to gwang111/sagemaker-python-sdk
that referenced
this pull request
Nov 14, 2026
* fix(codegen): restore codestyle-doc-tests compliance after botocore sync (aws#6523) * fix(codegen): avoid double blank line before logger in resources.py The generated sagemaker-core resources.py had two blank lines between the import block and the module logger, which black collapses to one — failing codestyle-doc-tests (sagemaker-core) black-check. The import block ends with "\n\n" and LOGGER_STRING began with a leading newline, so together they emitted the extra blank line. - tools/constants.py: drop the leading newline from LOGGER_STRING so regenerated resources.py is black-clean (durable fix; prevents the next daily Botocore sync from reintroducing it). - resources.py: reformat the currently-committed file to match. * fix(codegen): restore module docstrings in config_schema and shape_dag The daily Botocore sync (aws#6520) regenerated config_schema.py and shape_dag.py without their module docstrings, failing codestyle-doc-tests (sagemaker-core) docstyle (pydocstyle D100: missing docstring in public module). - config_schema.py / shape_dag.py: restore the module docstrings. - tools/resources_codegen.py / tools/shapes_extractor.py: emit the module docstring when generating these files so future daily syncs stay docstyle-clean (durable fix). --------- Co-authored-by: Roja Reddy Sareddy <rsareddy@amazon.com> * style(data_preparer): format DataPreparer files with black Run black 26.3.1 (the version pinned in requirements/tox) over the DataPreparer files that black-check flags, so the codestyle check passes on master. Formatting only: black's safe mode verified each file's AST is unchanged, and the unit suites give identical results before and after. No files outside this change are touched. --- X-AI-Prompt: Make the DataPreparer port pass public master's codestyle checks X-AI-Tool: Kiro * test(data_preparer): keep internal names out of the redaction guard The redaction guard listed the internal names it bans as plain regexes, so shipping it would publish them. Store those names only as SHA-256 hashes of a normalized key: identifier names match any CamelCase or underscore run inside one token (any case), phrases match consecutive words. Generic patterns (Java file references, *.aws.internal principals, account IDs, preview-era wording) stay as regexes. All 34 cases from the previous self-tests give the same result under the new matcher. The self-tests now exercise the matching rules with stand-in terms patched into the hash sets, so the file names nothing internal. Also reword an internal term in a test_preparer.py comment. --- X-AI-Prompt: Make the DataPreparer port safe and passing for the public PR X-AI-Tool: Kiro * test(data_preparer): run job-submitting integ suites on scheduled CI Mark the DataPreparer integration modules that submit jobs and wait for them (attach, SDG happy path, DT happy path, DT operators) as gpu_intensive, the repo's marker for tests that consume real capacity. PR checks deselect it. The cheap modules still run on PRs: schema validation (fails client-side before submission), stop (submit then stop) and the env-gated short-version attach. --- X-AI-Prompt: Make the DataPreparer port safe and passing for the public PR X-AI-Tool: Kiro * style(data_preparer): fix flake8 and pydocstyle findings Fix what public master's codestyle checks flag in DataPreparer code: - flake8: unused imports and a dead local (plus its comments about service internals), ambiguous names, over-long lines, a TYPE_CHECKING import for the Table annotation, and a duplicate DataPreparer key in sagemaker-core's config schema (identical values). - pydocstyle: one-line summaries for multi-line docstrings, and docstrings on the concrete DQ shape extractors. - Sphinx: fix an indentation error in the DatasetJobConfig docstring and the attach() Returns list, and link the schema reference page from the Data Preparation toctree. No behavior change; unit suites unchanged. --- X-AI-Prompt: Make the DataPreparer port pass public master's codestyle checks X-AI-Tool: Kiro * chore(data_preparer): remove KmsKeyId from SDG + DQ (aws#2347) * chore(data_preparer): remove KmsKeyId from SDG + DQ Drop the OutputDataConfig.KmsKeyId doc section, the stale schema fixture entry, and swap SDG-shaped unit-test fixtures to HubName. Ported from master-data-preparation 817c66527 (aws/sagemaker-python-sdk-staging#2347). The golden notebook hunk is left out; notebooks follow in a separate PR. --- X-AI-Prompt: Port the KmsKeyId removal (aws#2347) onto the public-readiness branch X-AI-Tool: Kiro * feat(data-preparer): default DataQualityEvaluation to 3.0.0 (aws#2365) * feat(data-preparer): default DataQualityEvaluation to 3.0.0 Raise the DQ schema-version ceiling to 3, so an unpinned evaluate() resolves 3.0.0 wherever the service shows it to the account and 2.0.0 where it does not. Explicit version pins still resolve as before. Look up a DQ job's progress file only in that job's own output folder, from its name and creation time: the 3.x layout {S3OutputPath}/data-quality-evaluation/{JobName}/{createdAt}/, then the 2.x layout {S3OutputPath}/{JobName}-{createdAt}/. The broad listing fallback could lock onto an earlier job that reused the name. Move the unpinned v2-shaped DQ integ test and the DQ doc examples to the 3.0.0 shape, and read outputs through MetadataS3Uri in the tutorial. * test(data-preparer): move the SDG-then-DQ integ test to the 3.0.0 shape TestSDGThenDQ submits an unpinned DQ request, which now resolves 3.0.0, so it sends Operations [default_metrics] instead of the v2 evaluation_name. The docstring no longer assumes the v2 output-folder layout. Ported from master-data-preparation 6fe2a49b9 (aws/sagemaker-python-sdk-staging#2365). Its MetadataS3Uri lookup replaces this branch's paginated listing of S3OutputPath for locating DQ records, so that listing, its constant and its tests are removed. Formatted with black; two unused test imports dropped. --- X-AI-Prompt: Port the DQ 3.0.0 default (aws#2365) onto the public-readiness branch X-AI-Tool: Kiro * chore(data_preparer): disable DataPreparer.analyze() Remove the public analyze() method from DataPreparer so GapAnalysis is not exposed in this release. The implementation (_analyze_impl) and JobCategory.GAP_ANALYSIS are kept, so re-enabling is a one-line change: restore `analyze = _DualCallable(_analyze_impl)`. Tests that call analyze() are skipped rather than changed, and can be un-skipped when the method is re-enabled. The category-mismatch error message and the module docstring no longer mention analyze(). Ported from aws/sagemaker-python-sdk-staging#2323 (29aab8050, not yet merged there). Conflicts resolved against this branch: the preparer module docstring keeps its one-line summary, and the integ skip marker sits after the DQ preview assertions. --- X-AI-Prompt: Disable GapAnalysis for the public release by porting aws#2323 X-AI-Tool: Kiro * test(data_preparer): pin analyze() as not exposed while GapAnalysis is off aws#2323 skips the analyze() tests but nothing fails if analyze is exposed again by accident. Assert DataPreparer (class and instance) has no analyze attribute, that generate/evaluate/transform/attach/stop remain, and that the category-mismatch error no longer points callers to analyze(). Two of the three fail with analyze exposed. --- X-AI-Prompt: Disable GapAnalysis for the public release by porting aws#2323 X-AI-Tool: Kiro * test(train): make SFT recipe-override integ tests recipe-proof (aws#6548) * test(train): make SFT recipe-override integ tests recipe-proof The canaries-v3-master (sagemaker-train) job started failing after the JumpStart Hub SFT recipe for meta-textgeneration-llama-3-2-1b-instruct was updated (hub content 2.17.0 / template v1.0.3): training_args nesting was removed, max_len renamed to dataset_max_len, the default learning_rate changed, and some validation bounds were relaxed. The SFT recipe-override integ tests pinned the old recipe shape/values, so they broke with no SDK or test change. Remove the 15 structure-pinning SFT tests; their merge/override/flatten/ validation behavior is already covered Hub-independently by the pinned- fixture unit tests in tests/unit/train/test_recipe_resolver.py. Add a schema-agnostic llama-SFT serverless test mirroring the existing RLVR and Nova serverless tests: keys are discovered dynamically from the live Hub spec and overrides are asserted by value, so the test survives future recipe/version drift. Leave the already recipe-proof suites (ModelTrainer local-recipe, evaluator, RLVR/Nova serverless) untouched. * test(train): assert override flows into resolved recipe, not serverless HP The scoped CodeBuild run surfaced that asserting override flow through the serverless-filtered hyperparameters is wrong for renamed-leaf keys (e.g. dataset_max_len -> training_config.data.max_length): the serverless path in _apply_recipe_to_hyperparameters filters flattened recipe leaf names against user-provided spec names, so renamed-leaf overrides are dropped. Assert override application against the resolved recipe (the resolver's contract) instead, keeping the test recipe-proof and leaf-name-agnostic. The serverless drop of renamed-leaf overrides is a separate SDK issue to be raised with the recipe owners. --------- Co-authored-by: rsareddy0329 <rsareddy@amazon.com> --------- Co-authored-by: rsareddy0329 <rsareddy0329@gmail.com> Co-authored-by: Roja Reddy Sareddy <rsareddy@amazon.com> Co-authored-by: Prarthana Rajapurohit <90079998+prar1907@users.noreply.github.com> Co-authored-by: Dokyung Yang <67037733+dokker19@users.noreply.github.com> Co-authored-by: Nutan Nara <nutanara@amazon.com> (cherry picked from commit 4b2aa3e42d1120b2a268a3bb8700561c5a4212f5)
gwang111
added a commit
to gwang111/sagemaker-python-sdk
that referenced
this pull request
Nov 14, 2026
Builds on aws#2323 (Nutan Nara), which hid DataPreparer.analyze() but kept the GapAnalysis code for a one-line re-enable. The package source and repo are public, so remove it entirely for this release: - preparer.py: _analyze_impl, the GapAnalysis branches in attach() and _run, the re-enable comment, and the attach() docstring mention. - constants.py: JobCategory.GAP_ANALYSIS and its schema-version ceiling. - sagemaker-core telemetry: the RecommendationResult ARN mapping. - tests: test_analyze.py, the GapAnalysis test in test_preparer.py and the integ test_03_analyze_gaps (and its env vars); the empty-output test now uses an unrecognized category string. attach() now rejects a job ARN whose category DataPreparer does not support with a ValueError listing the supported ones, before any service call; previously it reached DescribeJob and then failed on the enum lookup. The redaction guard bans the GapAnalysis names (hashed) and now also scans the DataPreparer unit tests for hashed internal names. master-data-preparation keeps GapAnalysis for a later release. --- X-AI-Prompt: Fully redact GapAnalysis/analyze from the public release branch, starting from Nutan's aws#2323 X-AI-Tool: Kiro (cherry picked from commit 2600542839c06b178f2bf99c13a7d21f260e1095)
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:
Description of changes:
Merge Checklist
Put an
xin 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
Tests
unique_name_from_baseto create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.