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

Add example notebooks to integ tests #198

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pintaoz-aws
Copy link
Collaborator

@pintaoz-aws pintaoz-aws commented Sep 12, 2024

Issue #, if available:

Description of changes:

Add the content in track_local_pytorch_experiment.ipynb to integ test. Add Endpoint.invoke() and Endpoint.invoke_with_response_stream() to existing test. Fix some bugs found during testing.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pintaoz-aws pintaoz-aws changed the title Add code example notebooks to integ tests Add example notebooks to integ tests Sep 13, 2024
@@ -500,7 +500,8 @@ def _serialize_dict(value: Dict) -> dict:
"""
serialized_dict = {}
for k, v in value.items():
if serialize_result := serialize(v):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The previous condition will miss values like integer 0

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we do if serialize_result := serialize(v) is not None: ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@pintaoz-aws pintaoz-aws marked this pull request as ready for review September 13, 2024 00:28
Comment on lines +75 to +77
trial_component.disassociate_trail(trial_name=trial.trial_name)
trial_component.delete()
trial.delete()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we move this to SageMakerCleaner so all resources cleanup is managed in one place ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TrialComponent must disassociate with Trial first, and they have to be deleted in the order TrialComponent -> Trial -> Experiment. So they can not be deleted in the way of deleting the same type of resources together

@@ -500,7 +500,8 @@ def _serialize_dict(value: Dict) -> dict:
"""
serialized_dict = {}
for k, v in value.items():
if serialize_result := serialize(v):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we do if serialize_result := serialize(v) is not None: ?


assert invoke_result.body

invoke_result = endpoint.invoke_with_response_stream(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Test seems to be failing .

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

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.

2 participants