fix: bug in get latest version was getting the max sorted alphabetically#5014
Merged
sage-maker merged 16 commits intoaws:masterfrom Feb 10, 2025
Merged
fix: bug in get latest version was getting the max sorted alphabetically#5014sage-maker merged 16 commits intoaws:masterfrom
sage-maker merged 16 commits intoaws:masterfrom
Conversation
tlian25
approved these changes
Feb 3, 2025
yusharon
approved these changes
Feb 3, 2025
evakravi
reviewed
Feb 5, 2025
src/sagemaker/jumpstart/utils.py
Outdated
| return wrapper_cache(_func) | ||
|
|
||
| def get_latest_version(versions: List[str]) -> Optional[str]: | ||
| try: return None if not versions else max(versions, key=Version) |
Member
There was a problem hiding this comment.
When would we return None, does this happen in practice?
Contributor
Author
There was a problem hiding this comment.
It returns none when the list is empty, this was the existing behavior.
evakravi
previously approved these changes
Feb 5, 2025
Contributor
|
Looks like there's conflicts |
6b49e42 to
8219160
Compare
Contributor
|
Several basic checks like lint and RTD are failing. Please fix. |
evakravi
pushed a commit
to evakravi/sagemaker-python-sdk
that referenced
this pull request
Mar 20, 2025
…lly (aws#5014) * fix: bug in get latest version was getting the max sorted alphabetically instead of sem-ver * handle invalid sev ver and incompatible sagemaker versions --------- Co-authored-by: Eli Davidson <elleedee@amazon.com> Co-authored-by: parknate@ <parknate@amazon.com>
pravali96
pushed a commit
to pravali96/sagemaker-python-sdk
that referenced
this pull request
Apr 21, 2025
…lly (aws#5014) * fix: bug in get latest version was getting the max sorted alphabetically instead of sem-ver * handle invalid sev ver and incompatible sagemaker versions --------- Co-authored-by: Eli Davidson <elleedee@amazon.com> Co-authored-by: parknate@ <parknate@amazon.com>
This file contains hidden or 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
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.
Issue #, if available:
Description of changes:
Testing done:
Merge Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. 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
Tests
unique_name_from_baseto create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.