diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 046261603d..0000000000 --- a/.codecov.yml +++ /dev/null @@ -1,2 +0,0 @@ -ignore: - - "**/tensorflow/tensorflow_serving/.*" diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 35f9af99dd..0000000000 --- a/.coveragerc +++ /dev/null @@ -1,5 +0,0 @@ -[run] -concurrency = threading -omit = sagemaker/tests/* -timid = True -disable_warnings = module-not-measured diff --git a/.dictionary b/.dictionary deleted file mode 100644 index 8907f4ff9b..0000000000 --- a/.dictionary +++ /dev/null @@ -1,38 +0,0 @@ -args -arn -autoscaling -aws -bool -boolean -boto -botocore -clienterror -cloudwatch -cron -config -dataset -datasets -datetime -desc -docstring -entrypoint -env -iam -hyperparameter -hyperparameters -jupyter -kms -kwargs -neo -noqa -rc -runtime -sagemaker -stdout -str -subdirectories -subnet -subnets -unexpectedstatusexception -uri -vpc diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 53e43383ac..0000000000 --- a/.flake8 +++ /dev/null @@ -1,6 +0,0 @@ -[flake8] -application_import_names = sagemaker, tests -import-order-style = google -per-file-ignores = - tests/unit/test_tuner.py: F405 - src/sagemaker/config/config_schema.py: E501 diff --git a/.githooks/pre-push b/.githooks/pre-push deleted file mode 100755 index 995ab70108..0000000000 --- a/.githooks/pre-push +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# this pre-push hook runs style checks and unit tests in python 3.8, 3.9, and 3.10 using tox. - -set -e - -TOX_PARALLEL_NO_SPINNER=1, -PY_COLORS=0 -start_time=`date +%s` -tox -e flake8,pylint,docstyle,black-check,twine --parallel all -./ci-scripts/displaytime.sh 'flake8,pylint,docstyle,black-check,twine' $start_time -start_time=`date +%s` -tox -e sphinx,doc8 --parallel all -./ci-scripts/displaytime.sh 'sphinx,doc8' $start_time -start_time=`date +%s` -tox -e py38,py39,py310 --parallel all -- tests/unit -./ci-scripts/displaytime.sh 'py38,py39,py310 unit' $start_time diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 048133d265..0000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: Bug report -about: File a report to help us reproduce and fix the problem -title: '' -labels: 'bug' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To reproduce** -A clear, step-by-step set of instructions to reproduce the bug. -The provided code need to be **complete** and **runnable**, if additional data is needed, please include them in the issue. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots or logs** -If applicable, add screenshots or logs to help explain your problem. - -**System information** -A description of your system. Please provide: -- **SageMaker Python SDK version**: -- **Framework name (eg. PyTorch) or algorithm (eg. KMeans)**: -- **Framework version**: -- **Python version**: -- **CPU or GPU**: -- **Custom Docker image (Y/N)**: - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 5d43bfd67c..0000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Ask a question - url: https://github.com/aws/sagemaker-python-sdk/discussions - about: Use GitHub Discussions to ask and answer questions diff --git a/.github/ISSUE_TEMPLATE/documentation-request.md b/.github/ISSUE_TEMPLATE/documentation-request.md deleted file mode 100644 index b64cd47873..0000000000 --- a/.github/ISSUE_TEMPLATE/documentation-request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Documentation request -about: Request improved documentation -title: '' -labels: '' -assignees: '' - ---- - -**What did you find confusing? Please describe.** -A clear and concise description of what you found confusing. Ex. I tried to [...] but I didn't understand how to [...] - -**Describe how documentation can be improved** -A clear and concise description of where documentation was lacking and how it can be improved. - -**Additional context** -Add any other context or screenshots about the documentation request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 014e654f27..0000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest new functionality for this library -title: '' -labels: 'feature request' -assignees: '' - ---- - -**Describe the feature you'd like** -A clear and concise description of the functionality you want. - -**How would this feature be used? Please describe.** -A clear and concise description of the use case for this feature. Please provide an example, if possible. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 6240c697f8..0000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,26 +0,0 @@ -*Issue #, if available:* - -*Description of changes:* - -*Testing done:* - -## 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](https://github.com/aws/sagemaker-python-sdk/blob/master/CONTRIBUTING.md) 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](https://github.com/aws/sagemaker-python-sdk/blob/master/CONTRIBUTING.md#committing-your-change) -- [ ] 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](https://github.com/aws/sagemaker-python-sdk/blob/master/README.rst) and [API docs](https://github.com/aws/sagemaker-python-sdk/tree/master/doc) (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`](https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/utils.py#L77) to 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. diff --git a/.github/workflows/codebuild-ci-health.yml b/.github/workflows/codebuild-ci-health.yml deleted file mode 100644 index 7ecefd310f..0000000000 --- a/.github/workflows/codebuild-ci-health.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: CI Health -on: - schedule: - - cron: "0 */3 * * *" - workflow_dispatch: - -permissions: - id-token: write # This is required for requesting the JWT - -jobs: - codestyle-doc-tests: - runs-on: ubuntu-latest - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} - aws-region: us-west-2 - role-duration-seconds: 10800 - - name: Run Codestyle & Doc Tests - uses: aws-actions/aws-codebuild-run-build@v1 - with: - project-name: sagemaker-python-sdk-ci-health-codestyle-doc-tests - unit-tests: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["py38", "py39", "py310", "py311"] - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} - aws-region: us-west-2 - role-duration-seconds: 10800 - - name: Run Unit Tests - uses: aws-actions/aws-codebuild-run-build@v1 - with: - project-name: sagemaker-python-sdk-ci-health-unit-tests - env-vars-for-codebuild: | - PY_VERSION - env: - PY_VERSION: ${{ matrix.python-version }} - integ-tests: - runs-on: ubuntu-latest - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} - aws-region: us-west-2 - role-duration-seconds: 10800 - - name: Run Integ Tests - uses: aws-actions/aws-codebuild-run-build@v1 - id: codebuild - with: - project-name: sagemaker-python-sdk-ci-health-integ-tests - slow-tests: - runs-on: ubuntu-latest - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} - aws-region: us-west-2 - role-duration-seconds: 10800 - - name: Run Slow Tests - uses: aws-actions/aws-codebuild-run-build@v1 - with: - project-name: sagemaker-python-sdk-ci-health-slow-tests - localmode-tests: - runs-on: ubuntu-latest - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} - aws-region: us-west-2 - role-duration-seconds: 10800 - - name: Run Local Mode Tests - uses: aws-actions/aws-codebuild-run-build@v1 - with: - project-name: sagemaker-python-sdk-ci-health-localmode-tests \ No newline at end of file diff --git a/.github/workflows/codebuild-ci.yml b/.github/workflows/codebuild-ci.yml deleted file mode 100644 index 85919f0afe..0000000000 --- a/.github/workflows/codebuild-ci.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: PR Checks -on: - pull_request_target: - branches: - - "master*" - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref }} - cancel-in-progress: true - -permissions: - id-token: write # This is required for requesting the JWT - -jobs: - collab-check: - runs-on: ubuntu-latest - outputs: - approval-env: ${{ steps.collab-check.outputs.result }} - steps: - - name: Collaborator Check - uses: actions/github-script@v7 - id: collab-check - with: - github-token: ${{ secrets.COLLAB_CHECK_TOKEN }} - result-encoding: string - script: | - try { - const res = await github.rest.repos.checkCollaborator({ - owner: context.repo.owner, - repo: context.repo.repo, - username: "${{ github.event.pull_request.user.login }}", - }); - console.log("Verifed ${{ github.event.pull_request.user.login }} is a repo collaborator. Auto Approving PR Checks.") - return res.status == "204" ? "auto-approve" : "manual-approval" - } catch (error) { - console.log("${{ github.event.pull_request.user.login }} is not a collaborator. Requiring Manual Approval to run PR Checks.") - return "manual-approval" - } - wait-for-approval: - runs-on: ubuntu-latest - needs: [collab-check] - environment: ${{ needs.collab-check.outputs.approval-env }} - steps: - - run: echo "Workflow Approved! Starting PR Checks." - codestyle-doc-tests: - runs-on: ubuntu-latest - needs: [wait-for-approval] - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} - aws-region: us-west-2 - role-duration-seconds: 10800 - - name: Run Codestyle & Doc Tests - uses: aws-actions/aws-codebuild-run-build@v1 - with: - project-name: sagemaker-python-sdk-ci-codestyle-doc-tests - source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}' - unit-tests: - runs-on: ubuntu-latest - needs: [wait-for-approval] - strategy: - fail-fast: false - matrix: - python-version: ["py38","py39","py310","py311"] - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} - aws-region: us-west-2 - role-duration-seconds: 10800 - - name: Run Unit Tests - uses: aws-actions/aws-codebuild-run-build@v1 - with: - project-name: sagemaker-python-sdk-ci-unit-tests - source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}' - env-vars-for-codebuild: | - PY_VERSION - env: - PY_VERSION: ${{ matrix.python-version }} - integ-tests: - runs-on: ubuntu-latest - needs: [wait-for-approval] - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} - aws-region: us-west-2 - role-duration-seconds: 10800 - - name: Run Integ Tests - uses: aws-actions/aws-codebuild-run-build@v1 - with: - project-name: sagemaker-python-sdk-ci-integ-tests - source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}' diff --git a/.github/workflows/submodule-codebuild-ci.yml b/.github/workflows/submodule-codebuild-ci.yml new file mode 100644 index 0000000000..aad9b8c160 --- /dev/null +++ b/.github/workflows/submodule-codebuild-ci.yml @@ -0,0 +1,161 @@ +name: Sagemaker PR Checks +on: + pull_request_target: + branches: + - "master-v3" + paths: + - 'sagemaker-train/**' + - 'sagemaker-serve/**' + - 'sagemaker-mlops/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref }} + cancel-in-progress: true + +permissions: + id-token: write + +jobs: + collab-check: + runs-on: ubuntu-latest + outputs: + approval-env: ${{ steps.collab-check.outputs.result }} + steps: + - name: Collaborator Check + uses: actions/github-script@v7 + id: collab-check + with: + github-token: ${{ secrets.COLLAB_CHECK_TOKEN }} + result-encoding: string + script: | + try { + const res = await github.rest.repos.checkCollaborator({ + owner: context.repo.owner, + repo: context.repo.repo, + username: "${{ github.event.pull_request.user.login }}", + }); + console.log("Verifed ${{ github.event.pull_request.user.login }} is a repo collaborator. Auto Approving PR Checks.") + return res.status == "204" ? "auto-approve" : "manual-approval" + } catch (error) { + console.log("${{ github.event.pull_request.user.login }} is not a collaborator. Requiring Manual Approval to run PR Checks.") + return "manual-approval" + } + wait-for-approval: + runs-on: ubuntu-latest + needs: [ collab-check ] + environment: ${{ needs.collab-check.outputs.approval-env }} + steps: + - run: echo "Workflow Approved! Starting PR Checks." + detect-changes: + runs-on: ubuntu-latest + needs: [wait-for-approval] + outputs: + submodules: ${{ steps.check-changes.outputs.submodules }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + token: ${{ secrets.REPO_ACCESS_KEY }} # or use appropriate token + ref: ${{ github.event.pull_request.base.ref }} # Target branch (master-v3) + - name: Detect Changes + id: check-changes + run: | + set -e # Exit on error + + # Debug information + echo "Target Branch: ${{ github.event.pull_request.base.ref }}" + echo "Current Target SHA: $(git rev-parse HEAD)" + echo "PR Number: ${{ github.event.pull_request.number }}" + echo "PR Latest SHA: ${{ github.event.pull_request.head.sha }}" + # Fetch PR without creating a branch + git fetch origin pull/${{ github.event.pull_request.number }}/head + CHANGES=$(git diff --name-only HEAD FETCH_HEAD) + + echo "Changed files:" + echo "$CHANGES" + + SUBMODULES=[] + + if echo "$CHANGES" | grep -q "^sagemaker-train/"; then + SUBMODULES='["sagemaker-train"]' + fi + if echo "$CHANGES" | grep -q "^sagemaker-serve/"; then + if [ "$SUBMODULES" = '[]' ]; then + SUBMODULES='["sagemaker-serve"]' + else + SUBMODULES=$(echo $SUBMODULES | sed 's/\]$/,"sagemaker-serve"\]/') + fi + fi + if echo "$CHANGES" | grep -q "^sagemaker-mlops/"; then + if [ "$SUBMODULES" = '[]' ]; then + SUBMODULES='["sagemaker-mlops"]' + else + SUBMODULES=$(echo $SUBMODULES | sed 's/\]$/,"sagemaker-mlops"\]/') + fi + fi + echo "Final SUBMODULES: $SUBMODULES" + echo "submodules=$SUBMODULES" >> $GITHUB_OUTPUT + + codestyle-doc-tests: + runs-on: ubuntu-latest + needs: [detect-changes] + if: needs.detect-changes.outputs.submodules != '[]' + strategy: + matrix: + submodule: ${{ fromJson(needs.detect-changes.outputs.submodules) }} + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} + aws-region: us-west-2 + role-duration-seconds: 10800 + + - name: Run CodeBuild for ${{ matrix.submodule }} + uses: aws-actions/aws-codebuild-run-build@v1 + with: + project-name: ${{ github.event.repository.name }}-ci-${{ matrix.submodule }}-codestyle-doc-tests + source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}' + + unit-tests: + runs-on: ubuntu-latest + needs: [detect-changes] + if: needs.detect-changes.outputs.submodules != '[]' + strategy: + fail-fast: false + matrix: + submodule: ${{ fromJson(needs.detect-changes.outputs.submodules) }} + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} + aws-region: us-west-2 + role-duration-seconds: 10800 + + - name: Run Unit Tests for ${{ matrix.submodule }} + uses: aws-actions/aws-codebuild-run-build@v1 + with: + project-name: ${{ github.event.repository.name }}-ci-${{ matrix.submodule }}-unit-tests + source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}' + + integ-tests: + runs-on: ubuntu-latest + needs: [detect-changes] + if: needs.detect-changes.outputs.submodules != '[]' + strategy: + matrix: + submodule: ${{ fromJson(needs.detect-changes.outputs.submodules) }} + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} + aws-region: us-west-2 + role-duration-seconds: 10800 + + - name: Run Integ Tests for ${{ matrix.submodule }} + uses: aws-actions/aws-codebuild-run-build@v1 + with: + project-name: ${{ github.event.repository.name }}-ci-${{ matrix.submodule }}-integ-tests + source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}' \ No newline at end of file diff --git a/.gitignore b/.gitignore index ad6e488dbd..09935a1dc9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ dist/ **/*.pyc **.pyc scratch*.py +scratch/ .eggs *.egg examples/tensorflow/distributed_mnist/data @@ -32,6 +33,6 @@ env/ .python-version *.html **/_repack_script_launcher.sh -tests/data/**/_repack_model.py -tests/data/experiment/sagemaker-dev-1.0.tar.gz -src/sagemaker/serve/tmp_workspace \ No newline at end of file +sagemaker_train/src/**/container_drivers/sm_train.sh +sagemaker_train/src/**/container_drivers/sourcecode.json +sagemaker_train/src/**/container_drivers/distributed.json diff --git a/.pydocstylerc b/.pydocstylerc deleted file mode 100644 index a5083c0d63..0000000000 --- a/.pydocstylerc +++ /dev/null @@ -1,4 +0,0 @@ -[pydocstyle] -inherit = false -ignore = D104,D107,D202,D203,D213,D214,D400,D401,D404,D406,D407,D411,D413,D414,D415,D417 -match = (?!record_pb2).*\.py diff --git a/.pylintrc b/.pylintrc index 11e2ababa9..223580f4d3 100644 --- a/.pylintrc +++ b/.pylintrc @@ -94,7 +94,24 @@ disable= useless-object-inheritance, # TODO: Enable this check and fix code once Python 2 is no longer supported. super-with-arguments, raise-missing-from, - E1136, + C0116, # Missing function or method docstring + C0209, # Use f-string instead of format + E0015, # Unrecognized option found in config + E0702, # Raising a string instead of an exception + E1101, # Module has no member (likely dynamic attr) + E1136, # Value assigned to something inferred as None + R0022, # Useless option value in config + R1710, # Inconsistent return statements + R1714, # Consider using `in` with comparisons + R1729, # Use a generator + R1732, + R1735, # Consider using a dict or list literal + W0237, # Argument renamed in override + W0613, # Unused argument + W0621, # Redefining name from outer scope + W0719 + W1404, # Implicit string concatenation + W1514, # `open()` used without encoding [REPORTS] # Set the output format. Available formats are text, parseable, colorized, msvs @@ -310,7 +327,7 @@ ignore-mixin-members=yes # (useful for modules/projects where namespaces are manipulated during runtime # and thus existing member attributes cannot be deduced by static analysis. It # supports qualified module names, as well as Unix pattern matching. -ignored-modules=distutils +ignored-modules= # List of class names for which member attributes should not be checked (useful # for classes with dynamically set attributes). This supports the use of @@ -384,7 +401,7 @@ max-returns=6 max-branches=12 # Maximum number of statements in function / method body -max-statements=100 +max-statements=105 # Maximum number of parents for a class (see R0901). max-parents=7 @@ -436,4 +453,4 @@ analyse-fallback-blocks=no # Exceptions that will emit a warning when being caught. Defaults to # "Exception" -overgeneral-exceptions=Exception +overgeneral-exceptions=builtins.Exception diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index 0a6e3928b5..0000000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# ReadTheDocs environment customization to allow us to use conda to install -# libraries which have C dependencies for the doc build. See: -# https://docs.readthedocs.io/en/latest/config-file/v2.html - -version: 2 - -build: - os: ubuntu-20.04 - tools: - python: "3.9" - - -python: - install: - - method: pip - path: . - - requirements: doc/requirements.txt - - -sphinx: - configuration: doc/conf.py - fail_on_warning: true # http://www.sphinx-doc.org/en/master/man/sphinx-build.html#id6 diff --git a/CHANGELOG.md b/CHANGELOG.md index 880e5df8c5..438eb2f68a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,947 @@ # Changelog +## v3.0.1 (2025-11-19) + +* Update project dependencies to include submodules: sagemaker-core, sagemaker-train, sagemaker-serve, sagemaker-mlops + +## v3.0.0 (2025-11-19) + +### Major Version Release + +#### ⚠️ Breaking Changes + +#### Important: Please review these breaking changes before upgrading. + +* Version 3.0.0 represents a significant milestone in our product's evolution. This major release introduces a modernized architecture, enhanced performance, and powerful new features while maintaining our commitment to user experience and reliability. +* Older interfaces such as Estimator, Model, Predictor and all their subclasses will not be supported in V3. +* Please review documentation of interfaces for parameters support (especially ModelBuilder) + +## v2.254.1 (2025-10-31) + +### Bug Fixes and Other Changes + + * update get_execution_role to directly return the ExecutionRoleArn if it presents in the resource metadata file + * [hf] HF PT Training DLCs + +## v2.254.0 (2025-10-29) + +### Features + + * Triton v25.09 DLC + +### Bug Fixes and Other Changes + + * Add Numpy 2.0 support + * add HF Optimum Neuron DLCs + * [Hugging Face][Pytorch] Inference DLC 4.51.3 + * [hf] HF Inference TGI + +## v2.253.1 (2025-10-14) + +### Bug Fixes and Other Changes + + * Update instance type regex to also include hyphens + * Revert the change "Add Numpy 2.0 support" + * [hf-tei] add image uri to utils + * add TEI 1.8.2 + +## v2.253.0 (2025-10-10) + +### Features + + * Added condition to allow eval recipe. + * add model_type hyperparameter support for Nova recipes + +### Bug Fixes and Other Changes + + * Fix for a failed slow test: numpy fix + * Add numpy 2.0 support + * chore: domain support for eu-isoe-west-1 + * Adding default identity implementations to InferenceSpec + * djl regions fixes #5273 + * Fix flaky integ test + +## v2.252.0 (2025-09-29) + +### Features + + * change S3 endpoint env name + * add eval custom lambda arn to hyperparameters + +### Bug Fixes and Other Changes + + * merge rba without the iso region changes + * handle trial component status message longer than API supports + * Add nova custom lambda in hyperparameter from estimator + * add retryable option to emr step in SageMaker Pipelines + * Feature/js mlops telemetry + * latest tgi + +## v2.251.1 (2025-08-29) + +### Bug Fixes and Other Changes + + * chore: onboard tei 1.8.0 + +## v2.251.0 (2025-08-21) + +### Features + + * support pipeline versioning + +### Bug Fixes and Other Changes + + * GPT OSS Hotfix + * dockerfile stuck on interactive shell + * add sleep for model deployment + +## v2.250.0 (2025-08-08) + +### Features + + * Add support for InstancePlacementConfig in Estimator for training jobs running on ultraserver capacity + +### Bug Fixes and Other Changes + + * Add more constraints to test requirements + +## v2.249.0 (2025-07-31) + +### Features + + * AWS Batch for SageMaker Training jobs + +### Bug Fixes and Other Changes + + * Directly use customer-provided endpoint name for ModelBuilder deployment. + * update image_uri_configs 07-23-2025 07:18:25 PST + +## v2.248.2 (2025-07-22) + +### Bug Fixes and Other Changes + + * Relax boto3 version requirement + * update image_uri_configs 07-22-2025 07:18:25 PST + * update image_uri_configs 07-18-2025 07:18:28 PST + * add hard dependency on sagemaker-core pypi lib + * When rootlessDocker is enabled, return a fixed SageMaker IP + +## v2.248.1 (2025-07-16) + +### Bug Fixes and Other Changes + + * Nova training support + +## v2.248.0 (2025-07-15) + +### Features + + * integrate amtviz for visualization of tuning jobs + +### Bug Fixes and Other Changes + + * build(deps): bump requests in /tests/data/serve_resources/mlflow/pytorch + * build(deps): bump protobuf from 4.25.5 to 4.25.8 in /requirements/extras + * build(deps): bump mlflow in /tests/data/serve_resources/mlflow/xgboost + * build(deps): bump torch in /tests/data/modules/script_mode + * sanitize git clone repo input url + * Adding Hyperpod feature to enable hyperpod telemetry + * Adding Hyperpod feature to enable hyperpod telemetry + * Bump SMD version to enable custom workflow deployment. + * Update TF DLC python version to py312 + * update image_uri_configs 07-04-2025 07:18:27 PST + * update image_uri_configs 06-26-2025 07:18:35 PST + * relax protobuf to <6.32 + +## v2.247.1 (2025-06-23) + +### Bug Fixes and Other Changes + + * update image_uri_configs 06-19-2025 07:18:34 PST + +## v2.247.0 (2025-06-13) + +### Features + + * Add support for MetricDefinitions in ModelTrainer + +### Bug Fixes and Other Changes + + * update jumpstart region_config, update image_uri_configs 06-12-2025 07:18:12 PST + * Add ignore_patterns in ModelTrainer to ignore specific files/folders + * Allow import failure for internal _hashlib module + +## v2.246.0 (2025-06-04) + +### Features + + * Triton v25.04 DLC + +### Bug Fixes and Other Changes + + * Update Attrs version to widen support + * update estimator documentation regarding hyperparameters for source_dir + +## v2.245.0 (2025-05-28) + +### Features + + * Correct mypy type checking through PEP 561 + +### Bug Fixes and Other Changes + + * MLFLow update for dependabot + * addWaiterTimeoutHandling + * merge method inputs with class inputs + * update image_uri_configs 05-20-2025 07:18:17 PST + +## v2.244.2 (2025-05-19) + +### Bug Fixes and Other Changes + + * include model channel for gated uncompressed models + * clarify model monitor one time schedule bug + * update jumpstart region_config 05-15-2025 07:18:15 PST + * update image_uri_configs 05-14-2025 07:18:16 PST + * Add image configs and region config for TPE (ap-east-2) + * Improve defaults handling in ModelTrainer + +## v2.244.1 (2025-05-15) + +### Bug Fixes and Other Changes + + * Fix Flask-Limiter version + * Fix test_huggingface_tei_uris() + * huggingface-llm-neuronx dlc + * huggingface-neuronx dlc image_uri + * huggingface-tei dlc image_uri + * Fix test_deploy_with_update_endpoint() + * add AG v1.3 + * parameter mismatch in update_endpoint + * remove --strip-component for untar source tar.gz + * Fix type annotations + * chore: Allow omegaconf >=2.2,<3 + * honor json serialization of HPs + * Map llama models to correct script + * pin test dependency + * fix bad initialization script error message + * Improve error logging and documentation for issue 4007 + * build(deps): bump scikit-learn + * build(deps): bump mlflow + * build(deps): bump mlflow in /tests/data/serve_resources/mlflow/pytorch + * chore: Add tei 1.6.0 image + +## v2.244.0 (2025-05-02) + +### Features + + * support custom workflow deployment in ModelBuilder using SMD image. + +### Bug Fixes and Other Changes + + * Add Owner ID check for bucket with path when prefix is provided + * Add model server timeout + * pin mamba version to 24.11.3-2 to avoid inconsistent test runs + * Update ModelTrainer to support s3 uri and tar.gz file as source_dir + * chore: add huggingface images + +## v2.243.3 (2025-04-23) + +### Bug Fixes and Other Changes + + * update readme to reflect py312 upgrade + * Revert the PR changes 5122 + * Py312 upgrade step 2: Update dependencies, integ tests and unit tests + * update pr test to deprecate py38 and add py312 + * update image_uri_configs 04-16-2025 07:18:18 PST + * update image_uri_configs 04-15-2025 07:18:10 PST + * update image_uri_configs 04-11-2025 07:18:19 PST + +## v2.243.2 (2025-04-16) + +### Bug Fixes and Other Changes + + * tgi image uri unit tests + * Fix deepdiff dependencies + +## v2.243.1 (2025-04-11) + +### Bug Fixes and Other Changes + + * Added handler for pipeline variable while creating process job + * Fix issue #4856 by copying environment variables + * remove historical job_name caching which causes long job name + * Update instance gpu info + * Master + * Add mlflow tracking arn telemetry + * chore: fix semantic versioning for wildcard identifier + * flaky test + +### Documentation Changes + + * update pipelines step caching examples to include more steps + * update ModelStep data dependency info + +## v2.243.0 (2025-03-27) + +### Features + + * Enabled update_endpoint through model_builder + +### Bug Fixes and Other Changes + + * Update for PT 2.5.1, SMP 2.8.0 + * chore: move jumpstart region definitions to json file + * fix flaky clarify model monitor test + * fix flaky spark processor integ + * use temp file in unit tests + * Update transformers version + * Aligned disable_output_compression for @remote with Estimator + * Update Jinja version + * update image_uri_configs 03-26-2025 07:18:16 PST + * chore: fix integ tests to use latest version of model + * update image_uri_configs 03-25-2025 07:18:13 PST + * Skip tests failed due to deprecated instance type + * update image_uri_configs 03-21-2025 07:17:55 PST + * factor in set instance type when building JumpStart models in ModelBuilder. + * ADD Documentation to ReadtheDocs for Upgrading torch versions + * add new regions to JUMPSTART_LAUNCHED_REGIONS + +## v2.242.0 (2025-03-14) + +### Features + + * add integ tests for training JumpStart models in private hub + +### Bug Fixes and Other Changes + + * Torch upgrade + * Prevent RunContext overlap between test_run tests + * remove s3 output location requirement from hub class init + * Fixing Pytorch training python version in tests + * update image_uri_configs 03-11-2025 07:18:09 PST + * resolve infinite loop in _find_config on Windows systems + * pipeline definition function doc update + +## v2.241.0 (2025-03-06) + +### Features + + * Make DistributedConfig Extensible + * support training for JumpStart model references as part of Curated Hub Phase 2 + * Allow ModelTrainer to accept hyperparameters file + +### Bug Fixes and Other Changes + + * Skip tests with deprecated instance type + * Ensure Model.is_repack() returns a boolean + * Fix error when there is no session to call _create_model_request() + * Use sagemaker session's s3_resource in download_folder + * Added check for the presence of model package group before creating one + * Fix key error in _send_metrics() + +## v2.240.0 (2025-02-25) + +### Features + + * Add support for TGI Neuronx 0.0.27 and HF PT 2.3.0 image in PySDK + +### Bug Fixes and Other Changes + + * Remove main function entrypoint in ModelBuilder dependency manager. + * forbid extras in Configs + * altconfig hubcontent and reenable integ test + * Merge branch 'master-rba' into local_merge + * py_version doc fixes + * Add backward compatbility for RecordSerializer and RecordDeserializer + * update image_uri_configs 02-21-2025 06:18:10 PST + * update image_uri_configs 02-20-2025 06:18:08 PST + +### Documentation Changes + + * Removed a line about python version requirements of training script which can misguide users. + +## v2.239.3 (2025-02-19) + +### Bug Fixes and Other Changes + + * added ap-southeast-7 and mx-central-1 for Jumpstart + * update image_uri_configs 02-19-2025 06:18:15 PST + +## v2.239.2 (2025-02-18) + +### Bug Fixes and Other Changes + + * Add warning about not supporting torch.nn.SyncBatchNorm + * pass in inference_ami_version to model_based endpoint type + * Fix hyperparameter strategy docs + * Add framework_version to all TensorFlowModel examples + * Move RecordSerializer and RecordDeserializer to sagemaker.serializers and sagemaker.deserialzers + +## v2.239.1 (2025-02-14) + +### Bug Fixes and Other Changes + + * keep sagemaker_session from being overridden to None + * Fix all type hint and docstrings for callable + * Fix the workshop link for Step Functions + * Fix Tensorflow doc link + * Fix FeatureGroup docstring + * Add type hint for ProcessingOutput + * Fix sourcedir.tar.gz filenames in docstrings + * Fix documentation for local mode + * bug in get latest version was getting the max sorted alphabetically + * Add cleanup logic to model builder integ tests for endpoints + * Fixed pagination failing while listing collections + * fix ValueError when updating a data quality monitoring schedule + * Add docstring for image_uris.retrieve + * Create GitHub action to trigger canaries + * update image_uri_configs 02-04-2025 06:18:00 PST + +## v2.239.0 (2025-02-01) + +### Features + + * Add support for deepseek recipes + +### Bug Fixes and Other Changes + + * mpirun protocol - distributed training with @remote decorator + * Allow telemetry only in supported regions + * Fix ssh host policy + +## v2.238.0 (2025-01-29) + +### Features + + * use jumpstart deployment config image as default optimization image + +### Bug Fixes and Other Changes + + * chore: add new images for HF TGI + * update image_uri_configs 01-29-2025 06:18:08 PST + * skip TF tests for unsupported versions + * Merge branch 'master-rba' into local_merge + * Add missing attributes to local resourceconfig + * update image_uri_configs 01-27-2025 06:18:13 PST + * update image_uri_configs 01-24-2025 06:18:11 PST + * add missing schema definition in docs + * Omegaconf upgrade + * SageMaker @remote function: Added multi-node functionality + * remove option + * fix typo + * fix tests + * Add an option for user to remove inputs and container artifacts when using local model trainer + +## v2.237.3 (2025-01-09) + +### Bug Fixes and Other Changes + + * pin metadata-version to 2.3 + * model server might have already done a serialization. honor that by not decoding the request again if it is not already bytes or bytestream + * Disable jumpstart tests missing clean up logic + * Jumpstart ap southeast 5 + * add autogluon 1.2 + * updated inference script to cover context + * security update -> use sha256 instead of md5 for file hashing + * Fix Flake8 Violations + * Added parsing string support for situations where custom code might be used (ie. mlflow) + * Updating Inference Optimization Validations + +## v2.237.2 (2024-12-17) + +### Bug Fixes and Other Changes + + * update image_uri_configs 12-13-2024 17:07:12 PST + * Cloudpickle upgrade + +## v2.237.1 (2024-12-12) + +### Bug Fixes and Other Changes + + * chore: remove support for ecr spec fallbacks for jumpstart models + * Cloudpickle Revert + * Cloudpickle update + * Numpy update + * Protobuf update + * Update to fetch latest Cloudpickle version + +## v2.237.0 (2024-12-05) + +### Features + + * Support SageMakerTrainingPlan for training jobs + * AMI support for BRM + * Adding Bedrock Store model support for HubService + +### Bug Fixes and Other Changes + + * Fix unit tests + * update boto3 and sagemaker-core version + * fix gpu_image uri + * Hotfix to construct rubik uri correctly + * fix codestyles + * fix merge artifact + * fix merge artifact + * fix test_requiremenets.txt + * chore: Merge from main + +## v2.236.0 (2024-12-04) + +### Features + + * Partner App Auth Provider for SDK support + * add pre-processing and post-processing logic to inference_spec + * add utility function to capture local snapshot + * support script mode with local train.sh + +### Bug Fixes and Other Changes + + * Add graphene to doc requirements + * Add graphne to the doc requirements + * Enable the Recipe tests marked with @pytest.mark.skip(reason="Hyperpod recipe code unavailable" + * Add model trainer documentation + * Usage docs for training recipes + * Neuron URIs update + * Update URIs to public for training recipes + * Changes for SMP v2.7.0 + * Change default source directory to current, add option to specify source dir + * Remove default values for fields in recipe_overrides and fix recipe path. + * Update MANIFEST.in so that wheel builds correctly + * fix the file uploading signature verification error + * remove example notebooks artifacts + * Morpheus tests + * Integ tests for local mode model trainer + * Update hyperpod recipe uris + * Add interface units for ModelTrainer + * Model Trainer Bucket improvements + * Update ModelTrainer Interface Parameters + * add in-process mode definition to docs + * Intelligent defaults for Model Trainer + * Fix tests and codestyle + * add integ test for base_model_builder_deploy and remove print statement + * Revert image builder + * pin xgboost dlc to 1.7.1 to fix test + * Skip JS model mapping with env vars or image URI provided + * Use sagemaker core Session + * Integration tests for Model Builder Handshake + * [Updated] Add telemetry to ModelTrainer, Estimator and ModelBuilder + * Update kandinsky in ModelTrainer and allow setting requirements + * add modelID support to model builder InProcess model + * Add Rich Logging to Model Builder + * Notebooks update for Bugbash + * Add bugbash bootstrapping + * add inference morpheus nbs + * Update ModelTrainer Notebooks + * Bug fixes + * Single container local training + * update notebooks + * update notebooks + * Add recipes examples + * Unified Deployment interface in Model Builder + * Use exact python path in trainer template + * Support building image from Dockerfile + * Add Support for Training Recipes + * Trainer handshake + * Pass hyperparameters as CLI args + * Add in_process mode support for DJL and TorchServe servers + * Remove ignored files + * Simplify Config Class Names and DistributedRunner structures + * Fix bug in script mode setup ModelTrainer + * Mask Sensitive Env Logs in Container + * Add path to set Additional Settings in ModelTrainer + * Add Distributed Training Support Model Trainer + * Cleanup ModelTrainer code + * Latest Container Image + * General image builder + * Cleanup ModelTrainer + * Revert Image Spec + * Support intelligent parameters + * Add enviornment variable bootstrapping script + * Add example notebook + * Add unit tests for ModelTrainer + * Image Spec refactoring and updates + * Base model trainer + +## v2.235.2 (2024-11-22) + +## v2.235.1 (2024-11-20) + +### Bug Fixes and Other Changes + + * Update sagemaker-core dep + * update image_uri_configs 11-20-2024 06:17:41 PST + +## v2.235.0 (2024-11-19) + +### Features + + * Optimize() validations across TRT, VLLM, Neuron container optimizations + +### Bug Fixes and Other Changes + + * update image_uri_configs 11-19-2024 06:17:58 PST + +## v2.234.0 (2024-11-19) + +### Features + + * optimization technique related validations. + +### Bug Fixes and Other Changes + + * Revert "change: add TGI 2.4.0 image uri (#4922)" + * pin testing deps + * add TGI 2.4.0 image uri + * add jumpstart ap-southeast-5 + * Move sagemaker-mlflow to extras + +## v2.233.0 (2024-11-04) + +### Features + + * triton v24.09 + * Marketplace model support in HubService + +### Bug Fixes and Other Changes + + * Fixing JumpStart Tests + * bumping smp version from 2.6.0 to 2.6.1 + * Updates for DJL 0.30.0 release + +## v2.232.3 (2024-10-30) + +### Bug Fixes and Other Changes + + * update image_uri_configs 10-29-2024 07:17:56 PST + * Skip pytorch tests incompatible with latest version 2.4.0 + * adding eu-central-2 bucket info to JS constants + * update image_uri_configs 10-23-2024 11:26:03 PST + * update image_uri_configs 10-17-2024 07:17:55 PST + * update image_uri_configs 10-03-2024 07:17:59 PST + * update image_uri_configs 09-27-2024 07:18:01 PST + * modified pull request template + * fixing typo in dependecy setup + * release: huggingface tgi neuronx 0.0.25 image + * Revert "update cloudpickle version to >=2.2.1 in pyproject.toml (#4899)" + * update cloudpickle version to >=2.2.1 in pyproject.toml + * update cloudpickle version to >=2.2.1 + * chore(deps): bump pyspark from 3.3.1 to 3.3.2 in /requirements/extras + * changes for PT 2.4 currency upgrade + * chore: add lmi image config in me-central-1 + * tests: Implement integration tests covering JumpStart PrivateHub workflows + * Use Miniforge to replace MambaForge + +## v2.232.2 (2024-10-03) + +### Bug Fixes and Other Changes + + * Pass kwargs to HuggingFaceModel.deploy() + * improve logging and exception messages + * remove deprecated distutils + * update image_uri_configs 09-24-2024 07:18:00 PST + +## v2.232.1 (2024-09-19) + +### Bug Fixes and Other Changes + + * update image_uri_configs 09-17-2024 07:17:54 PST + * support latest container version in image_uris and DJLModel for lmi c… + +## v2.232.0 (2024-09-12) + +### Features + + * add deployment config name in modelbuilder telemetry + * add Clarify image URIs for us-isof + +### Bug Fixes and Other Changes + + * chore: add flaky test markers & skip region with low P3 instance capacity + * update image_uri_configs 09-11-2024 11:54:11 PST + * update image_uri_configs 09-10-2024 07:18:01 PST + * [change] add us-gov and cn region repo accounts to djl and hugging face image metadata + * update image_uri_configs 09-06-2024 07:17:55 PST + * add us-gov region repo accounts to djl image metadata + * pass name from modelbuilder constructor to created model + +## v2.231.0 (2024-08-30) + +### Features + + * Add SageMaker Core to the dependency + +### Bug Fixes and Other Changes + + * Disable test_mnist_async + * SMP v2.5 + * update image_uri_configs 08-29-2024 07:17:59 PST + +## v2.230.0 (2024-08-28) + +### Features + + * FastAPI integration for In_Process Mode (2/2) + +### Bug Fixes and Other Changes + + * chore: add HF LLM neuronx 0.0.24 image + * TF-2.16 test modification and handling + * fix test fail + * Add troubleshooting links to exceptions + * cross account private hub model fine-tuning + * chore: cleanup jumpstart factory + * disable failing integration tests + +## v2.229.0 (2024-08-15) + +### Features + + * Support for ModelBuilder In_Process Mode (1/2) + * Pulling in dependencies (in_process mode) using conda environment + * Add optional CodeArtifact login to FrameworkProcessing job script + * implemented security-monitoring to send metrics to CW #1510 + +### Bug Fixes and Other Changes + + * alt configs model deployment and training issues + * fix keras extension in integ test + * update image_uri_configs 08-13-2024 07:17:54 PST + * trn1 instance family does not support volume size + * Update model.py + * removed log statement + * update image_uri_configs 08-09-2024 07:18:00 PST + * Added torchrun compatibility for distributet training across multiple GPUs in a single node (single instance) + * BiasConfig type hint + * add model monitor image accounts for ap-southeast-5 and eu-central-2 + * aligned UTC times with PST + * ensure hpt jobs inherit tags from config + * add JumpStart PDT and OSU regions + * chore(deps): bump certifi in /src/sagemaker/serve/utils + * Updates for DJL 0.29.0 release + * chore(deps): bump apache-airflow from 2.9.2 to 2.9.3 in /requirements/extras + * chore(deps): bump torch from 2.0.1 to 2.2.0 in /tests/data/serve_resources/mlflow/pytorch + * avoided printing stack trace and escaped input + * removing kwargs as this is breaking predictor_cls param for mode… + +## v2.228.0 (2024-08-06) + +### Features + + * triton v24.05 + +### Bug Fixes and Other Changes + + * chore: telemetry for deployment configs + * censoring sensitive values from being logged + * update image_uri_configs 08-05-2024 07:17:38 PST + * enable uncompressed model artifacts upload to S3 for SAGEMAKER_ENDPOINT overwrite for TGI, TEI, MMS model servers + * ModelReference deployment for Alt Configs models + * Add optional typecheck for nullable parameters + * Update package metadata + * release TEI 1.4.0 + +## v2.227.0 (2024-07-30) + +### Features + + * added code scanning through CodeQL + +### Bug Fixes and Other Changes + + * Fixed cpu isntance type for the estimator register test + * update image_uri_configs 07-29-2024 11:28:28 PST + * avoid AccessDenied error for a while on SageMaker Studio wtih do… + * SMP PT 2.3 Fix + * chore: pin framework version in serverless inference tests + * image uri in TGI 2.2.0 image + * explicitly access enum member values to avoid Python version related regression + * chore: add huggingface TGI 2.2.0 config + * update image_uri_configs 07-22-2024 11:53:54 PST + * update image_uri_configs 07-17-2024 07:17:38 PST + * update image_uri_configs 07-16-2024 07:17:45 PST + * add support for new regions + +## v2.226.1 (2024-07-17) + +## v2.226.0 (2024-07-12) + +### Features + + * Curated hub improvements + * InferenceSpec support for MMS and testing + +### Bug Fixes and Other Changes + + * ModelBuilder not passing HF_TOKEN to model. + * update image_uri_configs 07-10-2024 07:18:04 PST + +## v2.225.0 (2024-07-10) + +### Features + + * model optimization + +### Bug Fixes and Other Changes + + * fix integ test + * update uris for v1.1.1 + * update image_uri_configs 07-04-2024 07:17:24 PST + +## v2.224.4 (2024-07-04) + +### Bug Fixes and Other Changes + + * allow for inf spec and server override to be passed + +## v2.224.3 (2024-07-03) + +### Bug Fixes and Other Changes + + * Upgrade local dependencies + * Improve docstrings for estimator tags + +## v2.224.2 (2024-06-27) + +### Bug Fixes and Other Changes + + * Update DJLModel class for latest container releases + * list_models() for python3.8 + +## v2.224.1 (2024-06-21) + +### Bug Fixes and Other Changes + + * JumpStart CuratedHub Launch + * Update README.rst to show conda-forge version of SageMaker SDK + * Update tox.ini + * chore(deps): bump apache-airflow from 2.9.1 to 2.9.2 in /requirements/extras + * Model server override logic + +## v2.224.0 (2024-06-19) + +### Features + + * JumpStartModel attach + +### Bug Fixes and Other Changes + + * feat(sagemaker-mlflow): New features for SageMaker MLflow + * Upgrading to PT 2.3 for release + * chore: use ml.g5.2xlarge for integ test + * Enable telemetry logging for Remote function + * Fix Dependabot Issues - MLFlow Version + +## v2.223.0 (2024-06-13) + +### Features + + * add 'ModelCard' property to Register step + +### Bug Fixes and Other Changes + + * Fix Sniping bug fix + * Implement custom telemetry logging in SDK + * Fix ci unit-tests + * update image_uri_configs 06-12-2024 07:17:03 PST + +## v2.222.1 (2024-06-12) + +### Bug Fixes and Other Changes + + * First changes + * estimator.deploy not respecting instance type + +## v2.222.0 (2024-06-07) + +### Features + + * jumpstart telemetry + +### Bug Fixes and Other Changes + + * update image_uri_configs 06-06-2024 07:17:31 PST + * bump requests from 2.31.0 to 2.32.2 in /requirements/extras + * chore: add HF LLM neuronx 0.0.23 image + * Updates for DJL 0.28.0 release + * chore(deps): bump mlflow from 2.11.1 to 2.12.1 in /tests/data/serve_resources/mlflow/tensorflow + * chore(deps): bump mlflow from 2.11.1 to 2.12.1 in /tests/data/serve_resources/mlflow/xgboost + * chore(deps): bump mlflow from 2.10.2 to 2.12.1 in /tests/data/serve_resources/mlflow/pytorch + * chore(deps): bump apache-airflow from 2.9.0 to 2.9.1 in /requirements/extras + * chore(deps): bump requests from 2.31.0 to 2.32.2 in /tests/data/serve_resources/mlflow/pytorch + * Fix ci unit-tests + * Making project name in workflow files dynamic + * update image_uri_configs 05-29-2024 07:17:35 PST + * Update: SM Endpoint Routing Strategy Support. + +## v2.221.1 (2024-05-22) + +### Bug Fixes and Other Changes + + * Convert pytorchddp distribution to smdistributed distribution + * Add tei cpu image + +## v2.221.0 (2024-05-20) + +### Features + + * onboard tei image config to pysdk + +### Bug Fixes and Other Changes + + * JS Model with non-TGI/non-DJL deployment failure + * cover tei with image_uris.retrieve API + * Add more debuging + * model builder limited container support for endpoint mode. + * Image URI should take precedence for HF models + +## v2.220.0 (2024-05-15) + +### Features + + * AutoGluon 1.1.0 image_uris update + * add new images for HF TGI release + * Add telemetry support for mlflow models + +### Bug Fixes and Other Changes + + * add debug logs to workflow container dist creation + * model builder race condition on sagemaker session + * Add tensorflow_serving support for mlflow models and enable lineage tracking for mlflow models + * update image_uri_configs 05-09-2024 07:17:41 PST + * skip flakey tests pending investigation + +## v2.219.0 (2024-05-08) + +### Features + + * allow choosing js payload by alias in private method + +### Bug Fixes and Other Changes + + * chore(deps): bump jinja2 from 3.1.3 to 3.1.4 in /requirements/extras + * chore(deps): bump tqdm from 4.66.2 to 4.66.3 in /tests/data/serve_resources/mlflow/pytorch + * chore(deps): bump jinja2 from 3.1.3 to 3.1.4 in /doc + * Updates for SMP v2.3.1 + +## v2.218.1 (2024-05-03) + +### Bug Fixes and Other Changes + + * Fix UserAgent logging in Python SDK + * chore: release tgi 2.0.1 + * chore: update skipped flaky tests + +## v2.218.0 (2024-05-01) + +### Features + + * set default allow_pickle param to False + +### Bug Fixes and Other Changes + + * properly close files in lineage queries and tests + ## v2.217.0 (2024-04-24) ### Features diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index 7f7ac28644..0000000000 --- a/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @aws/sagemaker-ml-frameworks diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 3b64466870..0000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,4 +0,0 @@ -## Code of Conduct -This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). -For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact -opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 24226af4ee..6a78a25c21 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,6 +16,7 @@ information to effectively respond to your bug report or contribution. * [Run the Unit Tests](#run-the-unit-tests) * [Run the Integration Tests](#run-the-integration-tests) * [Make and Test Your Change](#make-and-test-your-change) + * [Lint Your Change](#lint-your-change) * [Commit Your Change](#commit-your-change) * [Send a Pull Request](#send-a-pull-request) * [Documentation Guidelines](#documentation-guidelines) @@ -61,6 +62,10 @@ Before sending us a pull request, please ensure that: 1. Follow the instructions at [Modifying an EBS Volume Using Elastic Volumes (Console)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/requesting-ebs-volume-modifications.html#modify-ebs-volume) to increase the EBS volume size associated with the newly created EC2 instance. 1. Wait 5-10min for the new EBS volume increase to finalize. 1. Allow EC2 to claim the additional space by stopping and then starting your EC2 host. +2. Set up a venv to manage dependencies: + 1. `python -m venv ~/.venv/myproject-env` to create the venv + 2. `source ~/.venv/myproject-env/bin/activate` to activate the venv + 3. `deactivate` to exit the venv ### Pull Down the Code @@ -74,8 +79,8 @@ Before sending us a pull request, please ensure that: ### Run the Unit Tests 1. Install tox using `pip install tox` -1. Install coverage using `pip install .[test]` -1. cd into the sagemaker-python-sdk folder: `cd sagemaker-python-sdk` or `cd /environment/sagemaker-python-sdk` +1. cd into the github project sagemaker-python-sdk folder: `cd sagemaker-python-sdk` or `cd /environment/sagemaker-python-sdk` +1. Install coverage using `pip install '.[test]'` 1. Run the following tox command and verify that all code checks and unit tests pass: `tox tests/unit` 1. You can also run a single test with the following command: `tox -e py310 -- -s -vv ::` 1. You can run coverage via runcvoerage env : `tox -e runcoverage -- tests/unit` or `tox -e py310 -- tests/unit --cov=sagemaker --cov-append --cov-report xml` @@ -113,6 +118,13 @@ If you are writing or modifying a test that creates a SageMaker job (training, t 1. If your changes include documentation changes, please see the [Documentation Guidelines](#documentation-guidelines). 1. If you include integration tests, do not mark them as canaries if they will not run in all regions. +### Lint Your Change + +Before submitting, ensure your code meets our quality and style guidelines. Run: +```shell +tox -e flake8,pylint,docstyle,black-check,twine --parallel all +``` +Address any errors or warnings before opening a pull request. ### Commit Your Change diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..f49a4e16e6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 0633468f44..0000000000 --- a/LICENSE.txt +++ /dev/null @@ -1,193 +0,0 @@ - Apache License - Version 2.0, January 2004 - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - ====================================================================================== - Amazon SageMaker Examples Subcomponents: - - The Amazon SageMaker Examples project contains subcomponents with separate - copyright notices and license terms. Your use of the source code for the - these subcomponents is subject to the terms and conditions of the following - licenses. See licenses/ for text of these licenses. - - If a folder hierarchy is listed as subcomponent, separate listings of - further subcomponents (files or folder hierarchies) part of the hierarchy - take precedence. - - ======================================================================================= - 2-clause BSD license - ======================================================================================= - _static/kendrasearchtools.js - _templates/search.html diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index c5eeeed043..0000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,15 +0,0 @@ -recursive-include src/sagemaker *.py - -include src/sagemaker/image_uri_config/*.json -include src/sagemaker/serve/schema/*.json -include src/sagemaker/serve/requirements.txt -recursive-include requirements * - -include VERSION -include LICENSE.txt -include README.rst - -prune tests - -recursive-exclude * __pycache__ -recursive-exclude * *.py[co] diff --git a/NOTICE.txt b/NOTICE.txt deleted file mode 100644 index 46da7e5caa..0000000000 --- a/NOTICE.txt +++ /dev/null @@ -1,2 +0,0 @@ -Amazon SageMaker Python SDK -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/README.rst b/README.rst index e59b2da9c5..9e362053b1 100644 --- a/README.rst +++ b/README.rst @@ -10,6 +10,10 @@ SageMaker Python SDK :target: https://pypi.python.org/pypi/sagemaker :alt: Latest Version +.. image:: https://img.shields.io/conda/vn/conda-forge/sagemaker-python-sdk.svg + :target: https://anaconda.org/conda-forge/sagemaker-python-sdk + :alt: Conda-Forge Version + .. image:: https://img.shields.io/pypi/pyversions/sagemaker.svg :target: https://pypi.python.org/pypi/sagemaker :alt: Supported Python Versions @@ -35,10 +39,21 @@ If you have **your own algorithms** built into SageMaker compatible Docker conta For detailed documentation, including the API reference, see `Read the Docs `_. -Table of Contents ------------------ +To install SageMaker Python SDK, see `Installing SageMaker Python SDK <#installing-the-sagemaker-python-sdk>`_. + +❗🔥 SageMaker V3 Release +------------------------- + +Version 3.0.0 represents a significant milestone in our product's evolution. This major release introduces a modernized architecture, enhanced performance, and powerful new features while maintaining our commitment to user experience and reliability. + +**Important: Please review these breaking changes before upgrading.** + +* Older interfaces such as Estimator, Model, Predictor and all their subclasses will not be supported in V3. +* Please review documentation of interfaces for parameters support (especially ModelBuilder) in our V3 examples folder. + +SageMaker V2 Examples +--------------------- -#. `Installing SageMaker Python SDK <#installing-the-sagemaker-python-sdk>`__ #. `Using the SageMaker Python SDK `__ #. `Using MXNet `__ #. `Using TensorFlow `__ @@ -90,10 +105,17 @@ Supported Python Versions SageMaker Python SDK is tested on: -- Python 3.8 - Python 3.9 - Python 3.10 - Python 3.11 +- Python 3.12 + +Telemetry +~~~~~~~~~~~~~~~ + +The ``sagemaker`` library has telemetry enabled to help us better understand user needs, diagnose issues, and deliver new features. This telemetry tracks the usage of various SageMaker functions. + +If you prefer to opt out of telemetry, you can easily do so by setting the ``TelemetryOptOut`` parameter to ``true`` in the SDK defaults configuration. For detailed instructions, please visit `Configuring and using defaults with the SageMaker Python SDK `__. AWS Permissions ~~~~~~~~~~~~~~~ @@ -180,9 +202,9 @@ Setup a Python environment, and install the dependencies listed in ``doc/require :: # conda - conda create -n sagemaker python=3.7 + conda create -n sagemaker python=3.12 conda activate sagemaker - conda install sphinx=3.1.1 sphinx_rtd_theme=0.5.0 + conda install sphinx=5.1.1 sphinx_rtd_theme=0.5.0 # pip pip install -r doc/requirements.txt diff --git a/VERSION b/VERSION index 70303736d8..13d683ccbf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.217.1.dev0 +3.0.1 \ No newline at end of file diff --git a/bin/README b/bin/README deleted file mode 100644 index 6accc729fc..0000000000 --- a/bin/README +++ /dev/null @@ -1,5 +0,0 @@ -Put your python scripts into this directory. - -Any script that has a shebang line with python in it and is executable -will be automatically included in your package. All others must be -declared explicitly in the setup.py file. diff --git a/ci-scripts/displaytime.sh b/ci-scripts/displaytime.sh deleted file mode 100755 index 6e1e474b4a..0000000000 --- a/ci-scripts/displaytime.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"). You -# may not use this file except in compliance with the License. A copy of -# the License is located at -# -# http://aws.amazon.com/apache2.0/ -# -# or in the "license" file accompanying this file. This file is -# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -# ANY KIND, either express or implied. See the License for the specific -# language governing permissions and limitations under the License. - -set -euo pipefail - -echo =================== $1 execution time =================== - -start_time=$2 -end_time=`date +%s` -total_time=$(expr $end_time - $start_time + 1) -hours=$((total_time/60/60%24)) -minutes=$((total_time/60%60)) -secs=$((total_time%60)) - -(( $hours > 0 )) && printf '%d hours ' $hours -(( $minutes > 0 )) && printf '%d minutes ' $minutes -(( $hours > 0 || $minutes > 0 )) && printf 'and ' -printf '%d seconds\n\n' $secs diff --git a/ci-scripts/queue_build.py b/ci-scripts/queue_build.py deleted file mode 100644 index fcff0b9a9b..0000000000 --- a/ci-scripts/queue_build.py +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"). You -# may not use this file except in compliance with the License. A copy of -# the License is located at -# -# http://aws.amazon.com/apache2.0/ -# -# or in the "license" file accompanying this file. This file is -# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -# ANY KIND, either express or implied. See the License for the specific -# language governing permissions and limitations under the License. -from __future__ import absolute_import - -import os -import re -import time - -import boto3 - -account = boto3.client( - "sts", region_name="us-west-2", endpoint_url="https://sts.us-west-2.amazonaws.com" -).get_caller_identity()["Account"] -bucket_name = "sagemaker-us-west-2-%s" % account - -MAX_IN_PROGRESS_BUILDS = 3 -INTERVAL_BETWEEN_CONCURRENT_RUNS = 15 # minutes -CLEAN_UP_TICKETS_OLDER_THAN = 8 # hours - - -def queue_build(): - ticket_number = int(1000 * time.time()) - files = _list_tickets() - _cleanup_tickets_older_than(files) - _wait_for_other_builds(ticket_number) - - -def _build_info_from_file(file): - filename = file.key.split("/")[2] - ticket_number, build_id, source_version = filename.split("_") - return int(ticket_number), build_id, source_version - - -def _wait_for_other_builds(ticket_number): - sorted_files = _list_tickets() - - print("build queue status:") - print() - - for order, file in enumerate(sorted_files): - file_ticket_number, build_id, source_version = _build_info_from_file(file) - print( - "%s -> %s %s, ticket number: %s status: %s" - % (order, build_id, source_version, file_ticket_number, file.key.split("/")[1]) - ) - print() - build_id = re.sub("[_/]", "-", os.environ.get("CODEBUILD_BUILD_ID", "CODEBUILD-BUILD-ID")) - source_version = re.sub( - "[_/]", - "-", - os.environ.get("CODEBUILD_SOURCE_VERSION", "CODEBUILD-SOURCE-VERSION"), - ) - filename = "%s_%s_%s" % (ticket_number, build_id, source_version) - s3_file_obj = _write_ticket(filename, status="waiting") - print("Build %s waiting to be scheduled" % filename) - - while True: - _cleanup_tickets_with_terminal_states() - waiting_tickets = _list_tickets("waiting") - if waiting_tickets: - first_waiting_ticket_number, _, _ = _build_info_from_file(_list_tickets("waiting")[0]) - else: - first_waiting_ticket_number = ticket_number - - if ( - len(_list_tickets(status="in-progress")) < 3 - and last_in_progress_elapsed_time_check() - and first_waiting_ticket_number == ticket_number - ): - # put the build in progress - print("Scheduling build %s for running.." % filename) - s3_file_obj.delete() - _write_ticket(filename, status="in-progress") - break - else: - # wait - time.sleep(30) - - -def last_in_progress_elapsed_time_check(): - in_progress_tickets = _list_tickets("in-progress") - if not in_progress_tickets: - return True - last_in_progress_ticket, _, _ = _build_info_from_file(_list_tickets("in-progress")[-1]) - _elapsed_time = int(1000 * time.time()) - last_in_progress_ticket - last_in_progress_elapsed_time = int(_elapsed_time / (1000 * 60)) # in minutes - return last_in_progress_elapsed_time > INTERVAL_BETWEEN_CONCURRENT_RUNS - - -def _cleanup_tickets_with_terminal_states(): - files = _list_tickets() - build_ids = [] - for file in files: - _, build_id, _ = _build_info_from_file(file) - build_ids.append(build_id) - - client = boto3.client("codebuild") - response = client.batch_get_builds(ids=build_ids) - - for file, build_details in zip(files, response["builds"]): - _, _build_id_from_file, _ = _build_info_from_file(file) - build_status = build_details["buildStatus"] - - if build_status != "IN_PROGRESS" and _build_id_from_file == build_details["id"]: - print( - "Build %s in terminal state: %s, deleting lock" - % (_build_id_from_file, build_status) - ) - file.delete() - - -def _cleanup_tickets_older_than(files): - oldfiles = list(filter(_file_older_than, files)) - for file in oldfiles: - print("object %s older than 8 hours. Deleting" % file.key) - file.delete() - return files - - -def _list_tickets(status=None): - s3 = boto3.resource("s3") - bucket = s3.Bucket(bucket_name) - prefix = "ci-integ-queue/{}/".format(status) if status else "ci-integ-queue/" - objects = [file for file in bucket.objects.filter(Prefix=prefix)] - files = list(filter(lambda x: x != prefix, objects)) - sorted_files = list(sorted(files, key=lambda y: y.key)) - return sorted_files - - -def _file_older_than(file): - timelimit = 1000 * 60 * 60 * CLEAN_UP_TICKETS_OLDER_THAN - file_ticket_number, build_id, source_version = _build_info_from_file(file) - return int(1000 * time.time()) - file_ticket_number > timelimit - - -def _write_ticket(filename, status="waiting"): - file_path = "ci-integ-queue/{}".format(status) - if not os.path.exists(file_path): - os.makedirs(file_path) - - file_full_path = file_path + "/" + filename - with open(file_full_path, "w") as file: - file.write(filename) - s3_file_obj = boto3.Session().resource("s3").Object(bucket_name, file_full_path) - s3_file_obj.upload_file(file_full_path) - print("Build %s is now in state %s" % (filename, status)) - return s3_file_obj - - -if __name__ == "__main__": - queue_build() diff --git a/doc/_static/js/datatable.js b/doc/_static/js/datatable.js deleted file mode 100644 index 897204e8df..0000000000 --- a/doc/_static/js/datatable.js +++ /dev/null @@ -1,4 +0,0 @@ -$(document).ready( function () { - $('table.datatable').DataTable(); - $('a.external').attr('target', '_blank'); -} ); \ No newline at end of file diff --git a/doc/_static/kendrasearchtools.js b/doc/_static/kendrasearchtools.js deleted file mode 100644 index 4920607010..0000000000 --- a/doc/_static/kendrasearchtools.js +++ /dev/null @@ -1,700 +0,0 @@ -/* - * kendrasearchtools.js - * ~~~~~~~~~~~~~~~~ - * - * A modification of searchtools.js (https://github.com/sphinx-doc/sphinx/blob/275d9/sphinx/themes/basic/static/searchtools.js) - * where the default full-text search implemented in searchtools.js is replaced with AWS Kendra searching over multiple - * websites. The default full-text search is still kept and implemented as a fallback in the case that the Kendra search doesn't work. - * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -if (!Scorer) { - /** - * Simple result scoring code. - */ - var Scorer = { - // Implement the following function to further tweak the score for each result - // The function takes a result array [filename, title, anchor, descr, score] - // and returns the new score. - /* - score: function(result) { - return result[4]; - }, - */ - - // query matches the full name of an object - objNameMatch: 11, - // or matches in the last dotted part of the object name - objPartialMatch: 6, - // Additive scores depending on the priority of the object - objPrio: {0: 15, // used to be importantResults - 1: 5, // used to be objectResults - 2: -5}, // used to be unimportantResults - // Used when the priority is not in the mapping. - objPrioDefault: 0, - - // query found in title - title: 15, - partialTitle: 7, - // query found in terms - term: 5, - partialTerm: 2 - }; -} - -if (!splitQuery) { - function splitQuery(query) { - return query.split(/\s+/); - } -} - -/** - * default rtd search (used as fallback) - */ -var Search = { - - _index : null, - _queued_query : null, - _pulse_status : -1, - - htmlToText : function(htmlString) { - var virtualDocument = document.implementation.createHTMLDocument('virtual'); - var htmlElement = $(htmlString, virtualDocument); - htmlElement.find('.headerlink').remove(); - docContent = htmlElement.find('[role=main]')[0]; - if(docContent === undefined) { - console.warn("Content block not found. Sphinx search tries to obtain it " + - "via '[role=main]'. Could you check your theme or template."); - return ""; - } - return docContent.textContent || docContent.innerText; - }, - - init : function() { - var params = $.getQueryParameters(); - if (params.q) { - var query = params.q[0]; - $('input[name="q"]')[0].value = query; - // this.performSearch(query); - } - }, - - loadIndex : function(url) { - $.ajax({type: "GET", url: url, data: null, - dataType: "script", cache: true, - complete: function(jqxhr, textstatus) { - if (textstatus != "success") { - document.getElementById("searchindexloader").src = url; - } - }}); - }, - - setIndex : function(index) { - var q; - this._index = index; - if ((q = this._queued_query) !== null) { - this._queued_query = null; - Search.query(q); - } - }, - - hasIndex : function() { - return this._index !== null; - }, - - deferQuery : function(query) { - this._queued_query = query; - }, - - stopPulse : function() { - this._pulse_status = 0; - }, - - startPulse : function() { - if (this._pulse_status >= 0) - return; - function pulse() { - var i; - Search._pulse_status = (Search._pulse_status + 1) % 4; - var dotString = ''; - for (i = 0; i < Search._pulse_status; i++) - dotString += '.'; - Search.dots.text(dotString); - if (Search._pulse_status > -1) - window.setTimeout(pulse, 500); - } - pulse(); - }, - - /** - * perform a search for something (or wait until index is loaded) - */ - performSearch : function(query) { - // create the required interface elements - this.out = $('#search-results'); - this.title = $('#search-results h2:first'); // $('

' + _('Searching') + '

').appendTo(this.out); - this.dots = $('#search-results span:first'); //$('').appendTo(this.title); - this.status = $('#search-results p:first'); // $('

 

').appendTo(this.out); - this.output = $('#search-results ul:first'); //$('