Skip to content

Commit 8834aaf

Browse files
committed
black
1 parent db187ca commit 8834aaf

File tree

10 files changed

+22
-12
lines changed

10 files changed

+22
-12
lines changed

integration-tests/models/test_grammar_response_format_llama.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ class Weather(BaseModel):
4343
],
4444
"seed": 42,
4545
"max_tokens": 500,
46-
"response_format": {"type": "json_object", "value": Weather.model_json_schema()},
46+
"response_format": {
47+
"type": "json_object",
48+
"value": Weather.model_json_schema(),
49+
},
4750
}
4851
# send the request
4952
response = requests.post(
@@ -75,7 +78,11 @@ class Weather(BaseModel):
7578

7679
json_payload["response_format"] = {
7780
"type": "json_schema",
78-
"value": {"name": "weather", "strict": True, "schema": Weather.model_json_schema()},
81+
"value": {
82+
"name": "weather",
83+
"strict": True,
84+
"schema": Weather.model_json_schema(),
85+
},
7986
}
8087
response = requests.post(
8188
f"{llama_grammar.base_url}/v1/chat/completions",
@@ -119,7 +126,10 @@ class Weather(BaseModel):
119126
"seed": 42,
120127
"max_tokens": 500,
121128
"tools": [],
122-
"response_format": {"type": "json_object", "value": Weather.model_json_schema()},
129+
"response_format": {
130+
"type": "json_object",
131+
"value": Weather.model_json_schema(),
132+
},
123133
},
124134
)
125135

server/text_generation_server/models/custom_modeling/idefics2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
""" PyTorch Idefics2 model."""
15+
"""PyTorch Idefics2 model."""
1616

1717
from typing import List, Optional, Tuple
1818

server/text_generation_server/models/custom_modeling/idefics3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
""" PyTorch Idefics3 model."""
15+
"""PyTorch Idefics3 model."""
1616

1717
from typing import List, Optional, Tuple
1818

server/text_generation_server/models/custom_modeling/idefics_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1818
# See the License for the specific language governing permissions and
1919
# limitations under the License.
20-
""" Idefics model configuration"""
20+
"""Idefics model configuration"""
2121
import copy
2222

2323
from transformers import PretrainedConfig

server/text_generation_server/models/custom_modeling/idefics_modeling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1818
# See the License for the specific language governing permissions and
1919
# limitations under the License.
20-
""" PyTorch Idefics model."""
20+
"""PyTorch Idefics model."""
2121
from typing import List, Optional, Tuple, Union
2222

2323
import torch

server/text_generation_server/models/custom_modeling/idefics_vision.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
""" PyTorch IdeficsVision model: a copy of CLIPVisionModel using a simpler config object"""
15+
"""PyTorch IdeficsVision model: a copy of CLIPVisionModel using a simpler config object"""
1616

1717

1818
from dataclasses import dataclass

server/text_generation_server/models/custom_modeling/llava_next.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
""" PyTorch Llava-NeXT model."""
15+
"""PyTorch Llava-NeXT model."""
1616

1717
from typing import List, Optional, Tuple
1818

server/text_generation_server/models/custom_modeling/neox_modeling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
""" PyTorch GPTNeoX model."""
15+
"""PyTorch GPTNeoX model."""
1616

1717
from typing import Optional, Tuple, Union
1818

server/text_generation_server/models/custom_modeling/t5_modeling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
""" PyTorch T5 model."""
15+
"""PyTorch T5 model."""
1616

1717
import copy
1818
import math

server/text_generation_server/utils/segments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
def find_segments(
12-
adapter_indices: Union[torch.Tensor, List[int]]
12+
adapter_indices: Union[torch.Tensor, List[int]],
1313
) -> Tuple[List[int], List[int]]:
1414
if isinstance(adapter_indices, torch.Tensor):
1515
adapter_indices = adapter_indices.cpu().numpy()

0 commit comments

Comments
 (0)