|
73 | 73 | MEMORY_BUFFER_MULTIPLIER = 1.2 # 20% buffer
|
74 | 74 | VERSION_DETECTION_ERROR = (
|
75 | 75 | "Please install accelerate and transformers for HuggingFace (HF) model "
|
76 |
| - "size calculations pip install 'sagemaker[huggingface]'" |
| 76 | + "size calculations e.g. pip install 'sagemaker[huggingface]'" |
77 | 77 | )
|
78 | 78 |
|
79 | 79 |
|
80 |
| -# pylint: disable=attribute-defined-outside-init |
| 80 | +# pylint: disable=attribute-defined-outside-init, disable=E1101 |
81 | 81 | @dataclass
|
82 | 82 | class ModelBuilder(Triton, DJL, JumpStart, TGI, Transformers):
|
83 | 83 | """Class that builds a deployable model.
|
@@ -730,14 +730,14 @@ def _total_inference_model_size_mib(self):
|
730 | 730 | to add up to an additional 20% to the given model size as found by EleutherAI.
|
731 | 731 | """
|
732 | 732 | try:
|
733 |
| - import accelerate.commands.estimate.estimate_command_parser |
734 |
| - import accelerate.commands.estimate.gather_data |
| 733 | + import accelerate.commands.estimate.estimate_command_parser as estimate_parser |
| 734 | + import accelerate.commands.estimate.gather_data as estimate_gather |
735 | 735 |
|
736 | 736 | dtypes = self.env_vars.get("dtypes", "float32")
|
737 |
| - parser = accelerate.commands.estimate.estimate_command_parser.estimate_command_parser() |
| 737 | + parser = estimate_parser() |
738 | 738 | args = parser.parse_args([self.model, "--dtypes", dtypes])
|
739 | 739 |
|
740 |
| - output = accelerate.commands.estimate.gather_data.gather_data( |
| 740 | + output = estimate_gather( |
741 | 741 | args
|
742 | 742 | ) # "dtype", "Largest Layer", "Total Size Bytes", "Training using Adam"
|
743 | 743 | except ImportError as e:
|
|
0 commit comments