-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: double Run create on load_run #3821
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -633,7 +633,10 @@ def _extract_run_name_from_tc_name(trial_component_name: str, experiment_name: s | |||||||||||||||||||||||||||||||
Returns: | ||||||||||||||||||||||||||||||||
str: The name of the Run object supplied by a user. | ||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||
return trial_component_name.replace("{}{}".format(experiment_name, DELIMITER), "", 1) | ||||||||||||||||||||||||||||||||
# TODO: we should revert the lower casting once backend fix reaches prod | ||||||||||||||||||||||||||||||||
return trial_component_name.replace( | ||||||||||||||||||||||||||||||||
"{}{}".format(experiment_name.lower(), DELIMITER), "", 1 | ||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
@staticmethod | ||||||||||||||||||||||||||||||||
def _append_run_tc_label_to_tags(tags: Optional[List[Dict[str, str]]] = None) -> list: | ||||||||||||||||||||||||||||||||
|
@@ -869,6 +872,8 @@ def list_runs( | |||||||||||||||||||||||||||||||
Returns: | ||||||||||||||||||||||||||||||||
list: A list of ``Run`` objects. | ||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
# all trial components retrieved by default | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean the sagemaker-python-sdk/src/sagemaker/experiments/trial_component.py Lines 248 to 262 in 8d2c16b
Or the list trial component API can retrieve all TCs in one call? If the next_token is not causing any issues, I'd suggest to keep it to avoid a breaking change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all trial components are retrieved by default: The problem with this parameter is where is the customer going to get the next_token to supply to method in the first place? The only way to get next_token is to call Also this method doesn't return a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer to remove since it is not providing useful behavior as it currently is. In the future we could re-add it but will need to return a NextToken so the customer can supply it in their own page-loop behavior. |
||||||||||||||||||||||||||||||||
tc_summaries = _TrialComponent.list( | ||||||||||||||||||||||||||||||||
experiment_name=experiment_name, | ||||||||||||||||||||||||||||||||
created_before=created_before, | ||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! So I assume this line would fix the issue of second run created? And will fix the list_runs issue #3673?
Can we add a unit test which does list_runs twice in case to validate in case any future changes break it again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, will do