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

Model.is_repack should return a bool but sometimes returns a None #4831

Open
lendle opened this issue Aug 14, 2024 · 0 comments
Open

Model.is_repack should return a bool but sometimes returns a None #4831

lendle opened this issue Aug 14, 2024 · 0 comments
Labels

Comments

@lendle
Copy link

lendle commented Aug 14, 2024

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.

@lendle lendle added the bug label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant