Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/config/image/autogluon/1.6-sagemaker-cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
image:
name: "autogluon-1.6-sagemaker-cpu"
description: "AutoGluon 1.6 CPU training and inference for SageMaker"

metadata:
framework: "autogluon"
framework_version: "1.6.3"
os_version: "amzn2023"
customer_type: "sagemaker"
platform: "sagemaker"
arch_type: "x86"
device_type: "cpu"
job_type: "general"
prod_image: "autogluon:1.6-cpu-amzn2023"

build:
dockerfile: "docker/autogluon/Dockerfile"
target: "sagemaker"
base_image: "public.ecr.aws/deep-learning-containers/pytorch:2.13-cpu-amzn2023-sagemaker"
requirements_file: "docker/autogluon/1.6/requirements.cpu.in"
python_version: "3.12"
dlc_major_version: "1"
dlc_minor_version: "0"

release:
# Gamma-testing the unified image before production.
# Follow-up: publish the AutoGluon docs only after the production release succeeds.
release: true
force_release: false
public_registry: false
private_registry: true
enable_soci: false
environment: "gamma"
34 changes: 34 additions & 0 deletions .github/config/image/autogluon/1.6-sagemaker-cuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
image:
name: "autogluon-1.6-sagemaker-cuda"
description: "AutoGluon 1.6 GPU training and inference for SageMaker"

metadata:
framework: "autogluon"
framework_version: "1.6.3"
os_version: "amzn2023"
customer_type: "sagemaker"
platform: "sagemaker"
arch_type: "x86"
device_type: "gpu"
job_type: "general"
prod_image: "autogluon:1.6-cu133-amzn2023"

build:
dockerfile: "docker/autogluon/Dockerfile"
target: "sagemaker"
base_image: "public.ecr.aws/deep-learning-containers/pytorch:2.13-cu133-amzn2023-sagemaker"
requirements_file: "docker/autogluon/1.6/requirements.cuda.in"
python_version: "3.12"
cuda_version: "13.3.0"
dlc_major_version: "1"
dlc_minor_version: "0"

release:
# Gamma-testing the unified image before production.
# Follow-up: publish the AutoGluon docs only after the production release succeeds.
release: true
force_release: false
public_registry: false
private_registry: true
enable_soci: false
environment: "gamma"
5 changes: 5 additions & 0 deletions .github/config/test-suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ suites:
code_paths:
- test/pytorch/integration/sagemaker/**

autogluon/sagemaker:
skip_eligible: true
code_paths:
- test/autogluon/sagemaker/**

tensorflow-inference/sagemaker:
skip_eligible: true
code_paths:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/autogluon.dispatch-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Dispatch - AutoGluon Release"

# AutoGluon ships a few times a year, so releases are triggered by hand rather
# than on a cron. Run once per config file from `main`; the pipeline's
# release-gate reads release.environment (gamma / production) from the config.

on:
workflow_dispatch:
inputs:
config-file:
description: "Path to image config YAML (e.g., .github/config/image/autogluon/1.6-sagemaker-cuda.yml)"
required: true
type: string

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

permissions:
contents: read

jobs:
pipeline:
uses: ./.github/workflows/autogluon.pipeline.yml
with:
config-file: ${{ inputs.config-file }}
tag-suffix: ${{ github.run_id }}
release: true
secrets: inherit
201 changes: 201 additions & 0 deletions .github/workflows/autogluon.pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
name: "Pipeline - AutoGluon"

on:
workflow_call:
inputs:
config-file:
description: "Path to image config YAML"
required: true
type: string
tag-suffix:
description: "CI tag suffix (run_id or pr-NUMBER)"
required: true
type: string
build:
description: "Whether to build the image (false = skip build, test against prod)"
required: false
type: boolean
default: true
run-sanity-test:
description: "Run sanity tests"
required: false
type: boolean
default: true
run-unit-test:
description: "Run serving adapter unit tests"
required: false
type: boolean
default: true
run-security-test:
description: "Run security tests"
required: false
type: boolean
default: true
run-telemetry-test:
description: "Run telemetry tests"
required: false
type: boolean
default: true
run-sagemaker-test:
description: "Run SageMaker training and endpoint tests"
required: false
type: boolean
default: true
release:
description: "Run release job after tests pass"
required: false
type: boolean
default: false
outputs:
image-uri:
description: "Built image URI (empty if build was skipped)"
value: ${{ jobs.build.outputs.image-uri }}

jobs:
build:
if: ${{ inputs.build }}
concurrency:
group: ${{ github.workflow }}-build-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: true
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-build-runner
buildspec-override:true
timeout-minutes: 120
outputs:
image-uri: ${{ steps.build.outputs.image-uri }}
steps:
- uses: actions/checkout@v6
- id: build
uses: ./.github/actions/build-image
with:
config-file: ${{ inputs.config-file }}
aws-account-id: ${{ vars.CI_AWS_ACCOUNT_ID }}
aws-region: ${{ vars.AWS_REGION }}
tag-suffix: ${{ inputs.tag-suffix }}

check:
if: ${{ always() && !failure() && !cancelled() }}
needs: [build]
concurrency:
group: ${{ github.workflow }}-check-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: true
uses: ./.github/workflows/_reusable.check-test-pass.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ${{ needs.build.outputs.image-uri || '' }}
suites: '["sanity", "telemetry", "autogluon/sagemaker"]'

unit-tests:
if: ${{ inputs.run-unit-test }}
uses: ./.github/workflows/autogluon.tests-unit.yml

sanity-test:
if: ${{ always() && !cancelled() && inputs.run-sanity-test && needs.build.result != 'failure' && fromJSON(needs.check.outputs.skips || '{}')['sanity'] != true }}
needs: [build, check]
concurrency:
group: ${{ github.workflow }}-sanity-test-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: true
uses: ./.github/workflows/_reusable.sanity-tests.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ${{ needs.build.outputs.image-uri || '' }}
image-content-hash: ${{ needs.check.outputs.image-content-hash }}
suite-code-hash: ${{ fromJSON(needs.check.outputs.suite-code-hashes || '{}')['sanity'] || '' }}

security-test:
if: ${{ always() && !failure() && !cancelled() && inputs.run-security-test }}
needs: [build]
concurrency:
group: ${{ github.workflow }}-security-test-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: true
uses: ./.github/workflows/_reusable.security-tests.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ${{ needs.build.outputs.image-uri || '' }}

telemetry-test:
if: ${{ always() && !cancelled() && inputs.run-telemetry-test && needs.build.result != 'failure' && fromJSON(needs.check.outputs.skips || '{}')['telemetry'] != true }}
needs: [build, check]
concurrency:
group: ${{ github.workflow }}-telemetry-test-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: false
uses: ./.github/workflows/_reusable.telemetry-tests.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ${{ needs.build.outputs.image-uri || '' }}
image-content-hash: ${{ needs.check.outputs.image-content-hash }}
suite-code-hash: ${{ fromJSON(needs.check.outputs.suite-code-hashes || '{}')['telemetry'] || '' }}

sagemaker-tests:
if: >-
${{ always() && !cancelled() && inputs.run-sagemaker-test &&
needs.build.result != 'failure' &&
fromJSON(needs.check.outputs.skips || '{}')['autogluon/sagemaker'] != true }}
needs: [build, check]
concurrency:
group: ${{ github.workflow }}-sagemaker-tests-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: false
uses: ./.github/workflows/autogluon.tests-sagemaker.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ${{ needs.build.outputs.image-uri || '' }}
image-content-hash: ${{ needs.check.outputs.image-content-hash }}
suite-code-hash: ${{ fromJSON(needs.check.outputs.suite-code-hashes || '{}')['autogluon/sagemaker'] || '' }}

release-gate:
if: >-
github.ref == 'refs/heads/main' &&
(contains(github.workflow_ref, '.autorelease') || contains(github.workflow_ref, '.dispatch-release')) &&
!contains(github.workflow_ref, '.pr') &&
inputs.release &&
!failure() && !cancelled() &&
needs.build.result == 'success'
needs: [build, unit-tests, sanity-test, security-test, telemetry-test, sagemaker-tests]
runs-on: ubuntu-latest
outputs:
should-release: ${{ steps.check.outputs.should-release }}
release-spec: ${{ steps.spec.outputs.release-spec }}
environment: ${{ steps.check.outputs.environment }}
steps:
- uses: actions/checkout@v6
- id: check
run: |
SHOULD_RELEASE=$(yq '.release.release' "${{ inputs.config-file }}")
ENVIRONMENT=$(yq '.release.environment' "${{ inputs.config-file }}")
echo "should-release=${SHOULD_RELEASE}" >> $GITHUB_OUTPUT
echo "environment=${ENVIRONMENT}" >> $GITHUB_OUTPUT
- id: spec
if: steps.check.outputs.should-release == 'true'
uses: ./.github/actions/generate-release-spec
with:
config-file: ${{ inputs.config-file }}

release:
if: ${{ !failure() && !cancelled() && needs.release-gate.outputs.should-release == 'true' }}
needs: [build, release-gate]
uses: ./.github/workflows/_reusable.release-image.yml
with:
source-image-uri: ${{ needs.build.outputs.image-uri }}
release-spec: ${{ needs.release-gate.outputs.release-spec }}
environment: ${{ needs.release-gate.outputs.environment }}
aws-region: ${{ vars.AWS_REGION }}
secrets: inherit

notify-failure:
if: >-
failure() &&
github.ref == 'refs/heads/main' &&
(contains(github.workflow_ref, '.autorelease') || contains(github.workflow_ref, '.dispatch-release')) &&
!contains(github.workflow_ref, '.pr') &&
inputs.release
needs: [build, unit-tests, sanity-test, security-test, telemetry-test, sagemaker-tests, release-gate, release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/notify-slack-failure
with:
webhook-url: ${{ secrets.SLACK_RELEASE_FAILURE_WEBHOOK_URL }}
workflow-name: ${{ github.workflow }}
config-file: ${{ inputs.config-file }}
run-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Loading
Loading