-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from aws/release-1-0-0
SageMaker HyperPod Recipes Release 1.0.0
- Loading branch information
Showing
198 changed files
with
15,046 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[run] | ||
# Exclude submodule directory from coverage | ||
omit = | ||
launcher/nemo/nemo_framework_launcher/* | ||
template/* | ||
|
||
[report] | ||
fail_under = 85 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
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. | ||
|
||
## How 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, error messages or logs | ||
If applicable, please share with us screenshots, error messages or logs to help explain your problem. | ||
|
||
## System information | ||
A description of your system. Please provide: | ||
- **Docker image you ran against**: | ||
- **Source code version you ran against**: | ||
- **Python version**: | ||
- **Hardware accelerator used**: | ||
|
||
## Additional context | ||
Add any other context about the problem here. Please provide any additional steps you have tried to solve your issue here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Documentation request | ||
about: Request improved documentation | ||
title: '' | ||
labels: 'documentation request' | ||
assignees: '' | ||
|
||
--- | ||
|
||
## What did you find confusing? | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest new functionality for this project | ||
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? | ||
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 about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## Description | ||
|
||
### Motivation | ||
Explain the motivation | ||
|
||
### Changes | ||
* List your changes | ||
|
||
### Testing | ||
Explain how the changes were tested | ||
|
||
## Merge Checklist | ||
Put an x in the boxes that apply. 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](../CONTRIBUTING.md) doc | ||
- [ ] I have run `pre-commit run --all-files` on my code. It will check for [this configuration](../.pre-commit-config.yaml). | ||
- [ ] I have updated any necessary documentation, including [READMEs](../README.md) and API docs (if appropriate) | ||
- [ ] I have verified the licenses used in the license-files artifact generated in the Python License Scan CI check. If the license workflow fails, kindly check the licenses used in the artifact. | ||
|
||
### Tests | ||
- [ ] I have run `pytest` on my code and all unit tests passed. | ||
- [ ] I have added tests that prove my fix is effective or that my feature works (if appropriate) | ||
|
||
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Python License Scan CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main # Change to the branch we want to target for PRs | ||
|
||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive # Checkout submodules as well | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' # Set python version to 3.8 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 # Set node version to 22 | ||
|
||
- name: Install package dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r launcher/nemo/nemo_framework_launcher/requirements.txt | ||
pip install -r requirements.txt | ||
pip install pip-licenses | ||
- name: Run license scanner | ||
run: | | ||
pip-licenses --with-description --order=license --format=json > LicenseArtifact.txt | ||
- name: Upload license files as artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: LicenseArtifact | ||
path: | | ||
LicenseArtifact.txt | ||
retention-days: 5 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ secrets.RUNNER_ROLE_ARN }} | ||
aws-region: us-west-2 | ||
|
||
- name: Git clone repolinter, get ruleset and run repolinter | ||
run: | | ||
cd .. | ||
git clone https://github.com/todogroup/repolinter.git | ||
cd repolinter | ||
npm install | ||
aws s3 cp --recursive ${{ secrets.REPOLINTER_S3LINK }} ./repolinter-ruleset | ||
node ./bin/repolinter.js lint ${{ github.workspace }} -r ./repolinter-ruleset/amazon-ospo-ruleset.json > ${{ github.workspace }}/scanOutput.txt | ||
- name: Perform license check | ||
run: | | ||
cd ${{ github.workspace }} | ||
aws s3 cp ${{ secrets.LICENSES_S3LINK }} ./ApprovedLicenses.txt | ||
chmod +x scripts/licenseChecker.sh | ||
./scripts/licenseChecker.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Python Pre Commit Check CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main # Change to the branch we want to target for PRs | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' # Set python version to 3.8 | ||
|
||
- name: Install pre-commit dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pre-commit | ||
- name: Run pre-commit checks | ||
run: | | ||
pre-commit run --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Python Pre Commit Check CI After Commit | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Triggers on direct pushes to the main branch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' # Set python version to 3.8 | ||
|
||
- name: Install pre-commit dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pre-commit | ||
- name: Run pre-commit checks | ||
run: | | ||
pre-commit run --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Repository Monitoring | ||
|
||
on: | ||
schedule: | ||
- cron: '0 16 * * *' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.run_id }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
check-pr-alerts: | ||
runs-on: ubuntu-latest | ||
if: github.event.repository.visibility == 'public' | ||
timeout-minutes: 10 | ||
outputs: | ||
pr_count: ${{ steps.pr-count.outputs.count }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Check for open PRs | ||
id: pr-count | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
run: | | ||
pr_count=$(gh pr list --state open --limit 1000 | wc -l) | ||
echo "count=$pr_count" >> $GITHUB_OUTPUT | ||
check-issue-alerts: | ||
runs-on: ubuntu-latest | ||
if: github.event.repository.visibility == 'public' | ||
timeout-minutes: 10 | ||
outputs: | ||
issue_count: ${{ steps.issue-count.outputs.count }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Check for open issues | ||
id: issue-count | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
run: | | ||
issue_count=$(gh issue list --state open --limit 1000 | wc -l) | ||
echo "count=$issue_count" >> $GITHUB_OUTPUT | ||
put-metric-data: | ||
runs-on: ubuntu-latest | ||
if: github.event.repository.visibility == 'public' | ||
timeout-minutes: 10 | ||
needs: [check-pr-alerts, check-issue-alerts] | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ secrets.RUNNER_ROLE_ARN }} | ||
role-session-name: repo-monitoring-cron-session | ||
aws-region: us-west-2 | ||
|
||
- name: Put PR Alert Metric Data | ||
run: | | ||
aws cloudwatch put-metric-data --metric-name PRAlert --namespace RepoMetrics --value ${{ needs.check-pr-alerts.outputs.pr_count }} --unit Count --dimensions ProjectName=sagemaker-hyperpod-recipes | ||
- name: Put Issue Alert Metric Data | ||
run: | | ||
aws cloudwatch put-metric-data --metric-name IssueAlert --namespace RepoMetrics --value ${{ needs.check-issue-alerts.outputs.issue_count }} --unit Count --dimensions ProjectName=sagemaker-hyperpod-recipes |
Oops, something went wrong.