Skip to content

Commit fcdc7da

Browse files
authored
fix: add training_plan_arn to compute MagicMock in serverful tests (#6270)
The training_plan_arn passthrough fix causes Pydantic validation errors in tests that use MagicMock for the compute object without explicitly setting training_plan_arn. MagicMock returns a MagicMock object instead of None/string, which Pydantic rejects. Add training_plan_arn=None to the compute MagicMock in test_base_trainer_serverful.py and test_serverful_recipe_validation.py.
1 parent 8d924cb commit fcdc7da

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎sagemaker-train/tests/unit/train/test_base_trainer_serverful.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def __init__(self, **kwargs):
3131
instance_count=1,
3232
volume_size_in_gb=100,
3333
keep_alive_period_in_seconds=None,
34+
training_plan_arn=None,
3435
)
3536
self.networking = None
3637
self.stopping_condition = None

‎sagemaker-train/tests/unit/train/test_serverful_recipe_validation.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def __init__(self, **kwargs):
4141
instance_count=4,
4242
volume_size_in_gb=100,
4343
keep_alive_period_in_seconds=None,
44+
training_plan_arn=None,
4445
)
4546
self.networking = None
4647
self.stopping_condition = None

0 commit comments

Comments
 (0)