Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SageMaker Groundtruth module added and tested #199

Closed
wants to merge 13 commits into from

Conversation

rtdurga
Copy link
Contributor

@rtdurga rtdurga commented Jul 19, 2024

Describe your changes

Issue ticket number and link

Checklist before requesting a review

  • I updated CHANGELOG.MD with a description of my changes
  • If the change was to a module, I ran the code validation script (scripts/validate.sh)
  • If the change was to a module, I have added thorough tests
  • If the change was to a module, I have added/updated the module's README.md
  • If a module was added, I added a reference to the module to the repository's README.md
  • I verified that my code deploys successfully using seedfarmer apply

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: d5c5207
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: a97dc23
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@kukushking kukushking self-requested a review July 22, 2024 13:25
@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: 33b0c6b
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

modules/sagemaker/sagemaker-groundtruth/app.py Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are all the assets from? Are they available under the appropriate license of this repository?

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: f058352
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: 1d08fb9
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: fee4424
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: 1eb3137
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's still some test images left in the PR.

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: 200122a
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: 8dce0ca
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: 8e6af49
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't want to add these extra __init__.py files as this doesn't represent a Python package. (Same goes for modules/sagemaker/__init__.py.)



## Deployment
The deployment of the required assets (Lambda functions, IAM roles, etc.) for the Step Functions workflow is automated using an AWS CDK app. The pipeline is triggered on a schedule as well as on Git commits, using two pipelines in AWS CodePipeline. The architecture of the CI/CD infrastructure deployed by the CDK app is as follows:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this missing a further description of the Ci/CD infrastructure?

#### Required
- Repository Details:

- assets bucket: The name of S3 bucket with assets for the lambda functions and images for labelling.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be a configuration option in settings.py?

## Inputs/Outputs

### Input Parameters
#### Required
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would help to denote the configuration names with tick marks to make them code!

Comment on lines +31 to +32
- repoName: The name of the repository where the source code is stored.
- branchName: The branch name to use from the repository.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the modules usually use kebab-case for parameters in the documentation (branch-name) and then snake-case in the code (branch_name).

Comment on lines +28 to +37
pre_build:
commands:
- cdk destroy --force --app "python app.py"
- echo "Prebuild stage"
build:
commands:
- echo "DESTROY!"
post_build:
commands:
- echo "Destroy successful"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pre_build:
commands:
- cdk destroy --force --app "python app.py"
- echo "Prebuild stage"
build:
commands:
- echo "DESTROY!"
post_build:
commands:
- echo "Destroy successful"
build:
commands:
- cdk destroy --force --app "python app.py"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be reduced to only the 10 or so images that we have in the PR now?

model_package_group_description: str = Field(
"Contains models for quality inspection of metal tags"
)
repoType: str = Field("CODECOMMIT")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll get type checking for free if we use an enum:

from enum import Enum

class RepoEnum(str, Enum):
    code_commit = 'CODECOMMIT'
    github = 'GITHUB'
Suggested change
repoType: str = Field("CODECOMMIT")
repoType: RepoEnum = RepoEnum.code_commit

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make more sense to provide a Python file that defines AppConfig to use instead of going from YAML -> loading it in Python -> renaming the fields to be something else.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the images are included twice -- in both lib/assets and tests/lib/assets. Why do we include them in both places? Can we only include them once?

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AIOpsModuleTestsInfrastruct-doMLXEYsnmxr
  • Commit ID: 3164158
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@kukushking kukushking marked this pull request as draft September 5, 2024 15:16
@kukushking
Copy link
Contributor

Closing as refactored in #252

@kukushking kukushking closed this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants