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

feat(sagemaker): add Endpoint L2 construct #22886

Merged
merged 13 commits into from
Nov 25, 2022

Conversation

petermeansrock
Copy link
Contributor

This is the third and final PR to complete the implementation of RFC 431:
aws/aws-cdk-rfcs#431

closes #2809


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

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


Co-authored-by: Matt McClean mmcclean@amazon.com
Co-authored-by: Long Yao yl1984108@gmail.com
Co-authored-by: Drew Jetter 60628154+jetterdj@users.noreply.github.com
Co-authored-by: Murali Ganesh 59461079+foxpro24@users.noreply.github.com
Co-authored-by: Abilash Rangoju 988529+rangoju@users.noreply.github.com

This is the third and final PR to complete the implementation of RFC
431:
aws/aws-cdk-rfcs#431

closes aws#2809

Co-authored-by: Matt McClean <mmcclean@amazon.com>
Co-authored-by: Long Yao <yl1984108@gmail.com>
Co-authored-by: Drew Jetter <60628154+jetterdj@users.noreply.github.com>
Co-authored-by: Murali Ganesh <59461079+foxpro24@users.noreply.github.com>
Co-authored-by: Abilash Rangoju <988529+rangoju@users.noreply.github.com>
@gitpod-io
Copy link

gitpod-io bot commented Nov 11, 2022

@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. p2 labels Nov 11, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team November 11, 2022 20:26
@petermeansrock petermeansrock marked this pull request as ready for review November 11, 2022 21:06
Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Okidoke @petermeansrock! I reviewed most of the code and left the tests alone for now. Few minor comments like always.

packages/@aws-cdk/aws-sagemaker/lib/endpoint.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-sagemaker/README.md Show resolved Hide resolved
packages/@aws-cdk/aws-sagemaker/lib/endpoint.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-sagemaker/lib/endpoint.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-sagemaker/lib/endpoint.ts Outdated Show resolved Hide resolved
* @param scalableProductionVariant ScalableProductionVariant instance
*/
private calculateScalingTarget( props: InvocationsScalingProps): number {
const safetyFactor = props.safetyFactor || 0.5;
Copy link
Contributor

Choose a reason for hiding this comment

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

are there any sane guardrails we should be putting on the safetyFactor? Is there a use case for someone to make safetyFactor > 1? Or 0? A few of these edge cases would result in calculateScalingTarget returning some problematic info, whether thats ridiculously high or low.

packages/@aws-cdk/aws-sagemaker/README.md Outdated Show resolved Hide resolved
Co-authored-by: Kaizen Conroy <36202692+kaizencc@users.noreply.github.com>
@mergify mergify bot dismissed kaizencc’s stale review November 22, 2022 01:13

Pull request has been modified.

@petermeansrock petermeansrock marked this pull request as draft November 22, 2022 01:50
@petermeansrock petermeansrock marked this pull request as ready for review November 22, 2022 19:32
Comment on lines 84 to 87
productionVariant.metricInvocations().createAlarm(stack, 'InvocationsAlarm', {
threshold: 1,
evaluationPeriods: 2,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

last thing... these alarms don't seem to be needed since we're not asserting that they exist or anything. Lets move this to a separate integ test as it doesn't really test the endpoint construct. maybe integ.alarms.ts or something.

It is cluttering the current integ test atm.

Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Adding changes requested since I'm looking for one thing in the integ test from an earlier comment. Everything else looks good, feel bad for blocking the approval on one thing but hopefully that's not too troublesome... once the integ tests are split out, I'm ready to slap the approval. Thanks for these quality PRs @petermeansrock!

@petermeansrock petermeansrock marked this pull request as draft November 23, 2022 22:58
@mergify mergify bot dismissed kaizencc’s stale review November 23, 2022 23:01

Pull request has been modified.

@petermeansrock petermeansrock marked this pull request as ready for review November 23, 2022 23:40
Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Yay @petermeansrock, thanks for all your hard work and quick turn around time! This looks good to me, and means that your RFC design is fully implemented. Congrats! If you are willing/interested, it will be interesting to see what kind of usage + issues we get on this new L2 library and would be great to have your continued participation on those issues as they come in! I may try to ping you...

@mergify
Copy link
Contributor

mergify bot commented Nov 25, 2022

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: c8e5a35
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit bf7586b into aws:main Nov 25, 2022
@mergify
Copy link
Contributor

mergify bot commented Nov 25, 2022

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sagemaker: Create L2 construct for Amazon SageMaker
3 participants