Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev_sagemaker_ground_truth' into…
Browse files Browse the repository at this point in the history
… dev_sagemaker_ground_truth
  • Loading branch information
rtdurga committed Aug 30, 2024
2 parents 60d7ebe + 8e6af49 commit 3164158
Show file tree
Hide file tree
Showing 74 changed files with 1,873 additions and 1,230 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/module-checks-dev-requirements-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Module Checks Dev Requirements Change

on:
push:
branches:
- "main"
paths:
- "requirements-dev.txt"

pull_request:
branches:
- "main"
- "release/*"
- "stable"
paths:
- "requirements-dev.txt"

jobs:
get-modules:
name: Get Modules
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.get-modules.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get modules
id: get-modules
run: |
set -x
# Get all the modules that have the file "deployspec.yaml"
MODULES=$(find modules -type f -name "deployspec.yaml" | cut -d/ -f 2-3 | uniq)
# Create our json structure [{"module_name": "..."}]
MODULES_JSON=$(echo "$MODULES" | jq -R -s 'split("\n")' | jq '[ .[] | select(length > 0) ]' | jq 'map({"module_name": .})')
# Export the modules as json to the outputs
echo 'matrix<<EOF' >> $GITHUB_OUTPUT
echo $MODULES_JSON >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
test:
name: Run unit tests for module ${{ matrix.modules.module_name }}
needs: get-modules
strategy:
fail-fast: false
matrix:
modules: ${{ fromJson(needs.get-modules.outputs.matrix) }}
python-version: [3.9]
node-version: [18.x]
runs-on: ubuntu-latest
env:
MODULE_PATH: 'modules/${{ matrix.modules.module_name }}'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- id: determine-language
name: Determine Language
run: |
set -x
if [ -f $MODULE_PATH/package.json ]; then \
echo "language=typescript" >> "$GITHUB_OUTPUT"; \
elif [ -f $MODULE_PATH/requirements.txt ]; then \
echo "language=python" >> "$GITHUB_OUTPUT"; \
elif [ -f $MODULE_PATH/pyproject.toml ]; then \
echo "language=python" >> "$GITHUB_OUTPUT"; \
fi
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Requirements (Python)
if: ${{ steps.determine-language.outputs.language == 'python' }}
run: |
set -x
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -r $MODULE_PATH/requirements.txt
- name: Install Requirements (Typescript)
if: ${{ steps.determine-language.outputs.language == 'typescript' }}
run: |
set -x
cd $MODULE_PATH
npm install
- name: Static checks and linting
run: scripts/validate.sh --language ${{ steps.determine-language.outputs.language }} --path $MODULE_PATH/
- name: Pytest
if: ${{ steps.determine-language.outputs.language == 'python' }}
run: cd $MODULE_PATH/ && pytest
- name: NPM Test
if: ${{ steps.determine-language.outputs.language == 'typescript' }}
run: cd $MODULE_PATH/ && npm test
20 changes: 16 additions & 4 deletions .github/workflows/module-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- "main"
paths:
- "modules/**"
- "requirements-dev.txt"
- ".github/workflows/module-checks.yml"

pull_request:
Expand All @@ -16,7 +15,6 @@ on:
- "stable"
paths:
- "modules/**"
- "requirements-dev.txt"
- ".github/workflows/module-checks.yml"

jobs:
Expand All @@ -27,15 +25,29 @@ jobs:
matrix: ${{ steps.get-modules.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: modules/**
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
- name: Get modules
id: get-modules
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
set -x
# Get all the modules that have the file "deployspec.yaml"
MODULES=$(find modules -type f -name "deployspec.yaml" | cut -d/ -f 2-3 | uniq)
MODULES=$(echo $ALL_CHANGED_FILES | cut -d/ -f 2-3 | uniq)
# Create our json structure [{"module_name": "..."}]
MODULES_JSON=$(echo "$MODULES" | jq -R -s 'split("\n")' | jq '[ .[] | select(length > 0) ]' | jq 'map({"module_name": .})')
# Export the modules as json to the outputs
Expand Down
24 changes: 22 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,37 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

=======

## UNRELEASED

### **Added**
Sagemaker GroundTruth module that deploys a set of lambda functions and a StepFunction to orchestrate them.
The module is used to identify missing labels from images stored on Amazon S3 bucket. Then label and validate them.
### **Changed**

## v1.4.0

### **Added**

- adds workflow specific to changes for `requirements-dev.txt` so all static checks are run
- add `ray-cluster` module based on `kuberay-helm` charts
- added FSx for Lustre to `ray-on-eks` manifest & persistent volume claim to `ray-cluster` module
- added worker tolerations to `ray-cluster` module

### **Changed**

- add integration tests for `sagemaker-studio`
- bump ecr module version to 1.10.0 to consume auto-delete images feature
- add service account to kuberay
- updated `get-modules` workflow to only run tests against changed files in `modules/**`
- Updated the `sagemaker-templates-service-catalog` module documentation to match the code layout.
- Modernize `sagemaker-templates-service-catalog` packaging and remove unused dependencies.
- remove custom manifests via `dataFiles` from `ray-on-eks`
- refactor `ray-on-eks` to `ray-cluster` and `ray-operator` modules
- downscope `ray-operator` service account permissions
- add an example custom `ray-image`
- document available manifests in readme
- add permission for SM studio to describe apps when domain resource isolation is enabled
- updated `ray-on-eks` manifest to use latest EKS IDF release

## v1.3.0

Expand Down
2 changes: 1 addition & 1 deletion DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
1. Clone the repository and checkout a release branch using the below command:

```
git clone --origin upstream --branch release/1.3.0 https://github.com/awslabs/aiops-modules
git clone --origin upstream --branch release/1.4.0 https://github.com/awslabs/aiops-modules
```
The release version can be replaced with the version of interest.

Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The modules in this repository are decoupled from each other and can be aggregat

The modules in this repository are / must be generic for reuse without affiliation to any one particular project in Machine Learning and Foundation Model Operations domain.

All modules in this repository adhere to the module structure defined in the the [SeedFarmer Guide](https://seed-farmer.readthedocs.io/en/latest)
All modules in this repository adhere to the module structure defined in the [SeedFarmer Guide](https://seed-farmer.readthedocs.io/en/latest)

- [Project Structure](https://seed-farmer.readthedocs.io/en/latest/project_development.html)
- [Module Development](https://seed-farmer.readthedocs.io/en/latest/module_development.html)
Expand All @@ -19,6 +19,18 @@ All modules in this repository adhere to the module structure defined in the the

See deployment steps in the [Deployment Guide](DEPLOYMENT.md).

## Project Manifests

End-to-end example use-cases built using modules in this repository.

| Type | Description |
|---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [MLOps with Amazon SageMaker](manifests/mlops-sagemaker/) | Set up environment for MLOps with Amazon SageMaker. Deploy secure Amazon SageMaker Studio Domain, and provisions SageMaker Project Templates using Service Catalog, including model training and deployment. |
| [Mlflow experiments tracking with Amazon SageMaker](manifests/mlflow-experiments-tracking/) | An example using Mlflow experiments tracking with Amazon SageMaker. Deploy self-hosted Mlflow instance on AWS Fargate, and Amazon SageMaker Studio Domain environment. |
| [MWAA ML Training](manifests/mwaa-ml-training/) | An example orchestrating ML training jobs with Managed Workflows for Apache Airflow (MWAA). Deploys MWAA and an example ML training DAG. |
| [Q&A RAG](manifests/fmops-qna-rag/) | Deploy AppSync GraphQL endpoint for Q&A chatbot with RAG based on OpenSearch, and data ingestion infrastructure. |
| [Ray on EKS](manifests/ray-on-eks/) | Run Ray on AWS EKS. Deploys an AWS EKS cluster, KubeRay Ray Operator, and a Ray Cluster with autoscaling enabled. |

## Modules

### SageMaker Modules
Expand Down Expand Up @@ -60,9 +72,12 @@ See deployment steps in the [Deployment Guide](DEPLOYMENT.md).

### EKS Modules

| Type | Description |
|-------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| [Ray on EKS Module](modules/eks/ray-on-eks/README.md) | Provisions Ray on EKS cluster using IDF EKS module, Ray Operator, and RayJob or RayCluster via Custom Resources. |
| Type | Description |
|-----------------------------------------------------------|--------------------------------------------------------------|
| [Ray Operator Module](modules/eks/ray-operator/README.md) | Provisions a Ray Operator on EKS. |
| [Ray Cluster Module](modules/eks/ray-cluster/README.md) | Provisions a Ray Cluster on EKS. Requires a Ray Operator. |
| [Ray Image Module](modules/eks/ray-image/README.md) | An example that builds a custom Ray image and pushes to ECR. |


### Example Modules

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.0
1.4.0
Loading

0 comments on commit 3164158

Please sign in to comment.