Skip to content

Commit

Permalink
Minor update to description
Browse files Browse the repository at this point in the history
  • Loading branch information
samruds committed Mar 14, 2024
1 parent 30b6c88 commit 0629384
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sagemaker/serve/builder/model_builder.py
Expand Up @@ -73,7 +73,7 @@
MEMORY_BUFFER_MULTIPLIER = 1.2 # 20% buffer
VERSION_DETECTION_ERROR = (
"Please install accelerate and transformers for HuggingFace (HF) model "
"size calculations pip install 'sagemaker[huggingface]'"
"size calculations e.g. pip install 'sagemaker[huggingface]'"
)


Expand Down Expand Up @@ -734,10 +734,12 @@ def _total_inference_model_size_mib(self):
import accelerate.commands.estimate.gather_data

Check warning on line 734 in src/sagemaker/serve/builder/model_builder.py

View check run for this annotation

Codecov / codecov/patch

src/sagemaker/serve/builder/model_builder.py#L732-L734

Added lines #L732 - L734 were not covered by tests

dtypes = self.env_vars.get("dtypes", "float32")
parser = accelerate.commands.estimate.estimate_command_parser.estimate_command_parser()
parser = (

Check warning on line 737 in src/sagemaker/serve/builder/model_builder.py

View check run for this annotation

Codecov / codecov/patch

src/sagemaker/serve/builder/model_builder.py#L736-L737

Added lines #L736 - L737 were not covered by tests
accelerate.commands.estimate.estimate_command_parser.estimate_command_parser()
) # pylint: disable=E1101
args = parser.parse_args([self.model, "--dtypes", dtypes])

Check warning on line 740 in src/sagemaker/serve/builder/model_builder.py

View check run for this annotation

Codecov / codecov/patch

src/sagemaker/serve/builder/model_builder.py#L740

Added line #L740 was not covered by tests

output = accelerate.commands.estimate.gather_data.gather_data(
output = accelerate.commands.estimate.gather_data.gather_data( # pylint: disable=E1101

Check warning on line 742 in src/sagemaker/serve/builder/model_builder.py

View check run for this annotation

Codecov / codecov/patch

src/sagemaker/serve/builder/model_builder.py#L742

Added line #L742 was not covered by tests
args
) # "dtype", "Largest Layer", "Total Size Bytes", "Training using Adam"
except ImportError as e:
Expand Down

0 comments on commit 0629384

Please sign in to comment.