From 2fd6e9f6e015f3fd101e3a1f75d36cab9d087ccf Mon Sep 17 00:00:00 2001 From: Ilyas Moutawwakil <57442720+IlyasMoutawwakil@users.noreply.github.com> Date: Fri, 24 Jan 2025 18:38:47 +0100 Subject: [PATCH] Preparing for version 0.5 and checking CI (#310) --- optimum_benchmark/backends/pytorch/backend.py | 6 +++--- optimum_benchmark/version.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/optimum_benchmark/backends/pytorch/backend.py b/optimum_benchmark/backends/pytorch/backend.py index 651e6d12..ea8aa0a1 100644 --- a/optimum_benchmark/backends/pytorch/backend.py +++ b/optimum_benchmark/backends/pytorch/backend.py @@ -436,9 +436,9 @@ def forward(self, inputs: Dict[str, Any], kwargs: Dict[str, Any]) -> OrderedDict @torch.inference_mode() def prefill(self, inputs: Dict[str, Any], kwargs: Dict[str, Any]) -> OrderedDict: - assert ( - kwargs.get("max_new_tokens") == kwargs.get("min_new_tokens") == 1 - ), "For prefilling, max_new_tokens and min_new_tokens must be equal to 1" + assert kwargs.get("max_new_tokens") == kwargs.get("min_new_tokens") == 1, ( + "For prefilling, max_new_tokens and min_new_tokens must be equal to 1" + ) return self.pretrained_model.generate(**inputs, **kwargs) @torch.inference_mode() diff --git a/optimum_benchmark/version.py b/optimum_benchmark/version.py index c48c68e6..f963a34e 100644 --- a/optimum_benchmark/version.py +++ b/optimum_benchmark/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.5.0.dev0" +__version__ = "0.5.0"