File tree 1 file changed +18
-3
lines changed
tests/integ/sagemaker/lineage
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -663,7 +663,12 @@ def static_endpoint_context(sagemaker_session, static_pipeline_execution_arn):
663
663
contexts = sagemaker_session .sagemaker_client .list_contexts (SourceUri = endpoint_arn )[
664
664
"ContextSummaries"
665
665
]
666
- if len (contexts ) != 1 :
666
+
667
+ logging .info (f"Found { len (contexts )} contexts associated with { endpoint_arn } " )
668
+ for ctx in contexts :
669
+ logging .info (f'Found context "{ ctx ["ContextArn" ]} "' )
670
+
671
+ if len (contexts ) == 0 :
667
672
raise (
668
673
Exception (
669
674
f"Got an unexpected number of Contexts for \
@@ -689,7 +694,12 @@ def static_model_package_group_context(sagemaker_session, static_pipeline_execut
689
694
contexts = sagemaker_session .sagemaker_client .list_contexts (SourceUri = model_package_group_arn )[
690
695
"ContextSummaries"
691
696
]
692
- if len (contexts ) != 1 :
697
+
698
+ logging .info (f"Found { len (contexts )} contexts associated with { model_package_group_arn } " )
699
+ for ctx in context :
700
+ logging .info (f'Found context "{ ctx ["ContextArn" ]} "' )
701
+
702
+ if len (contexts ) == 0 :
693
703
raise (
694
704
Exception (
695
705
f"Got an unexpected number of Contexts for \
@@ -713,7 +723,12 @@ def static_model_artifact(sagemaker_session, static_pipeline_execution_arn):
713
723
artifacts = sagemaker_session .sagemaker_client .list_artifacts (SourceUri = model_package_arn )[
714
724
"ArtifactSummaries"
715
725
]
716
- if len (artifacts ) != 1 :
726
+
727
+ logging .info (f"Found { len (artifacts )} artifacts associated with { model_package_arn } " )
728
+ for art in artifacts :
729
+ logging .info (f'Found artifact { art ["ArtifactArn" ]} ' )
730
+
731
+ if len (artifacts ) == 0 :
717
732
raise (
718
733
Exception (
719
734
f"Got an unexpected number of Artifacts for \
You can’t perform that action at this time.
0 commit comments