-
Notifications
You must be signed in to change notification settings - Fork 308
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
truncate sagemaker agent outputs and automate idempotence token handling #2588
Merged
Conversation
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
Signed-off-by: Samhita Alla <[email protected]>
samhita-alla
requested review from
wild-endeavor,
kumare3,
eapolinario,
pingsutw,
cosmicBboy,
thomasjpfan and
Future-Outlier
as code owners
July 19, 2024 09:43
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2588 +/- ##
==========================================
- Coverage 76.22% 72.22% -4.00%
==========================================
Files 187 185 -2
Lines 18938 18832 -106
Branches 3706 3705 -1
==========================================
- Hits 14435 13601 -834
- Misses 3870 4568 +698
- Partials 633 663 +30 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Samhita Alla <[email protected]>
Signed-off-by: Samhita Alla <[email protected]>
Signed-off-by: Samhita Alla <[email protected]>
Signed-off-by: Samhita Alla <[email protected]>
Signed-off-by: Samhita Alla <[email protected]>
Signed-off-by: Samhita Alla <[email protected]>
samhita-alla
changed the title
truncate sagemaker agent outputs
truncate sagemaker agent outputs and automate idempotence token handling
Jul 19, 2024
pingsutw
previously approved these changes
Jul 20, 2024
Signed-off-by: Samhita Alla <[email protected]>
pingsutw
approved these changes
Jul 22, 2024
Mecoli1219
pushed a commit
to Mecoli1219/flytekit
that referenced
this pull request
Jul 27, 2024
…ing (flyteorg#2588) * truncate sagemaker agent outputs Signed-off-by: Samhita Alla <[email protected]> * fix tests and update agent output Signed-off-by: Samhita Alla <[email protected]> * lint Signed-off-by: Samhita Alla <[email protected]> * fix test Signed-off-by: Samhita Alla <[email protected]> * add idempotence token to workflow Signed-off-by: Samhita Alla <[email protected]> * fix type Signed-off-by: Samhita Alla <[email protected]> * fix mixin Signed-off-by: Samhita Alla <[email protected]> * modify output handler Signed-off-by: Samhita Alla <[email protected]> --------- Signed-off-by: Samhita Alla <[email protected]>
mao3267
pushed a commit
to mao3267/flytekit
that referenced
this pull request
Jul 29, 2024
…ing (flyteorg#2588) * truncate sagemaker agent outputs Signed-off-by: Samhita Alla <[email protected]> * fix tests and update agent output Signed-off-by: Samhita Alla <[email protected]> * lint Signed-off-by: Samhita Alla <[email protected]> * fix test Signed-off-by: Samhita Alla <[email protected]> * add idempotence token to workflow Signed-off-by: Samhita Alla <[email protected]> * fix type Signed-off-by: Samhita Alla <[email protected]> * fix mixin Signed-off-by: Samhita Alla <[email protected]> * modify output handler Signed-off-by: Samhita Alla <[email protected]> --------- Signed-off-by: Samhita Alla <[email protected]> Signed-off-by: mao3267 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tracking issue
Why are the changes needed?
What changes were proposed in this pull request?
This PR truncates the SageMaker agent outputs to only return the ARNs. It also adds a new
idempotence_token
parameter to thecreate_sagemaker_deployment
function, which, when set toTrue
, appends an idempotence token to the relevant fields.How was this patch tested?
I've run the example locally. New output format:
[{'ModelArn': 'arn:aws:sagemaker:us-east-2:123456789:model/stable-diffusion-model-0b2634d258f999f6'}, {'EndpointConfigArn': 'arn:aws:sagemaker:us-east-2:123456789:endpoint-config/stable-diffusion-model-5825e66eb1014642'}, {'EndpointArn': 'arn:aws:sagemaker:us-east-2:123456789:endpoint/stable-diffusion-model-1-dc4144fef7e49561'}]
New deployment workflow:
The
idempotence_token
is set toTrue
by default, so the agent appends an idempotence token to model name, endpoint config name, and endpoint.If the field value isn't provided, such as
ModelName
, the agent appends the idempotence token to the workflow name and uses that as theModelName
.Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link