You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Model.is_repack should return a bool but sometimes returns a None #4831
Describe the bug is_repack is implemented as return self.source_dir and self.entry_point and not self.git_config and the return type hint is bool. If source_dir or entry_point is None, is_repack will return None for example.
To reproduce
from sagemaker import Model
assert isinstance(Model().is_repack(), bool) #this fails
Expected behavior
is_repack returns a bool, as the type hint suggests.
Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.
System information
A description of your system. Please provide:
SageMaker Python SDK version: I noticed this in 2.228.0, but it appears to still be the case in master.
Framework name (eg. PyTorch) or algorithm (eg. KMeans): NA
Framework version:NA
Python version: 3.10.6
CPU or GPU: NA
Custom Docker image (Y/N): N
Additional context
Maybe return self.source_dir is not None and self.entry_point is not None and self.git_config is None? Not sure if falsey empty strings/dicts should be treated as true or false.
Activity
pintaoz-aws commentedon Mar 5, 2025
Fixed by #5060