From dab1904bc2a4d3e6fd1aeca743da31bd50e5dac6 Mon Sep 17 00:00:00 2001 From: Christian-kam Date: Thu, 26 Feb 2026 13:16:45 +0100 Subject: [PATCH] Update utilities.py `sagemaker.core.workflow.utilities.get_training_code_hash` expects dependencies to be a list, but `SourceCode.requirements` is passed as a str. The change wrap requirements in a list before passing it: This ensures dependencies is always a List[str] inside get_training_code_hash, so the [source_dir] + dependencies and [entry_point] + dependencies list concatenations work correctly. --- sagemaker-core/src/sagemaker/core/workflow/utilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sagemaker-core/src/sagemaker/core/workflow/utilities.py b/sagemaker-core/src/sagemaker/core/workflow/utilities.py index 007520778e..fb9b59e0a0 100644 --- a/sagemaker-core/src/sagemaker/core/workflow/utilities.py +++ b/sagemaker-core/src/sagemaker/core/workflow/utilities.py @@ -174,7 +174,7 @@ def get_code_hash(step: Entity) -> str: source_dir = source_code.source_dir requirements = source_code.requirements entry_point = source_code.entry_script - return get_training_code_hash(entry_point, source_dir, requirements) + return get_training_code_hash(entry_point, source_dir, [requirements] if requirements else []) return None