From 88cdf89dbfb81630fe14c4e3c0ee2f97c2f4f34c Mon Sep 17 00:00:00 2001 From: Travis Addair Date: Mon, 13 May 2024 21:53:25 -0700 Subject: [PATCH] Formatting --- clients/python/tests/test_types.py | 3 +-- server/lorax_server/utils/layers.py | 4 +--- server/lorax_server/utils/tokens.py | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/clients/python/tests/test_types.py b/clients/python/tests/test_types.py index a779d7bb8..97703acc5 100644 --- a/clients/python/tests/test_types.py +++ b/clients/python/tests/test_types.py @@ -31,8 +31,7 @@ def test_parameters_validation(): # Test temperature Parameters(temperature=1) - with pytest.raises(ValidationError): - Parameters(temperature=0) + Parameters(temperature=0) with pytest.raises(ValidationError): Parameters(temperature=-1) diff --git a/server/lorax_server/utils/layers.py b/server/lorax_server/utils/layers.py index 5fda02bd9..5045967af 100644 --- a/server/lorax_server/utils/layers.py +++ b/server/lorax_server/utils/layers.py @@ -231,9 +231,7 @@ def __init__( index=None, ): super().__init__() - assert ( - not memory_efficient_backward - ), "memory_efficient_backward is no longer required and the argument is deprecated in 0.37.0 and will be removed in 0.39.0" + assert not memory_efficient_backward, "memory_efficient_backward is no longer required and the argument is deprecated in 0.37.0 and will be removed in 0.39.0" self.state = bnb.MatmulLtState() self.index = index diff --git a/server/lorax_server/utils/tokens.py b/server/lorax_server/utils/tokens.py index 199c1f107..f9cf935f9 100644 --- a/server/lorax_server/utils/tokens.py +++ b/server/lorax_server/utils/tokens.py @@ -1,9 +1,9 @@ import re +import warnings from contextlib import nullcontext from typing import List, Optional, Set, Tuple, Union import torch -import warnings from transformers import ( PreTrainedTokenizerBase, RepetitionPenaltyLogitsProcessor,