diff --git a/backends/exllamav2/model.py b/backends/exllamav2/model.py index 7b21c118..e1c90a58 100644 --- a/backends/exllamav2/model.py +++ b/backends/exllamav2/model.py @@ -1,4 +1,5 @@ """The model container class for ExLlamaV2 models.""" + import gc from itertools import zip_longest import pathlib diff --git a/common/args.py b/common/args.py index d3f19d8d..a1e12820 100644 --- a/common/args.py +++ b/common/args.py @@ -1,4 +1,5 @@ """Argparser for overriding config values""" + import argparse diff --git a/common/auth.py b/common/auth.py index 2e154e60..29264d13 100644 --- a/common/auth.py +++ b/common/auth.py @@ -2,6 +2,7 @@ This method of authorization is pretty insecure, but since TabbyAPI is a local application, it should be fine. """ + import secrets import yaml from fastapi import Header, HTTPException diff --git a/common/gen_logging.py b/common/gen_logging.py index db8acf16..7ae5bf6b 100644 --- a/common/gen_logging.py +++ b/common/gen_logging.py @@ -1,6 +1,7 @@ """ Functions for logging generation events. """ + from pydantic import BaseModel from loguru import logger from typing import Dict, Optional diff --git a/common/templating.py b/common/templating.py index bbd0596b..ed8af06e 100644 --- a/common/templating.py +++ b/common/templating.py @@ -1,4 +1,5 @@ """Small replication of AutoTokenizer's chat template system for efficiency""" + import json import pathlib from functools import lru_cache diff --git a/endpoints/OAI/types/common.py b/endpoints/OAI/types/common.py index 5cb27429..af92df81 100644 --- a/endpoints/OAI/types/common.py +++ b/endpoints/OAI/types/common.py @@ -1,4 +1,5 @@ -""" Common types for OAI. """ +"""Common types for OAI.""" + from pydantic import BaseModel, Field from typing import Optional diff --git a/endpoints/OAI/types/completion.py b/endpoints/OAI/types/completion.py index be0289ff..84b75193 100644 --- a/endpoints/OAI/types/completion.py +++ b/endpoints/OAI/types/completion.py @@ -1,4 +1,5 @@ -""" Completion API protocols """ +"""Completion API protocols""" + from pydantic import BaseModel, Field from time import time from typing import Dict, List, Optional, Union diff --git a/endpoints/OAI/types/lora.py b/endpoints/OAI/types/lora.py index 10c8327f..8435a8a4 100644 --- a/endpoints/OAI/types/lora.py +++ b/endpoints/OAI/types/lora.py @@ -1,4 +1,5 @@ -""" Lora types """ +"""Lora types""" + from pydantic import BaseModel, Field from time import time from typing import Optional, List diff --git a/endpoints/OAI/types/model.py b/endpoints/OAI/types/model.py index 5e308c67..a4729825 100644 --- a/endpoints/OAI/types/model.py +++ b/endpoints/OAI/types/model.py @@ -1,4 +1,5 @@ -""" Contains model card types. """ +"""Contains model card types.""" + from pydantic import BaseModel, Field, ConfigDict from time import time from typing import List, Optional diff --git a/endpoints/OAI/types/token.py b/endpoints/OAI/types/token.py index 8467aa6c..cda1cf1a 100644 --- a/endpoints/OAI/types/token.py +++ b/endpoints/OAI/types/token.py @@ -1,4 +1,5 @@ -""" Tokenization types """ +"""Tokenization types""" + from pydantic import BaseModel from typing import List diff --git a/endpoints/OAI/utils/chat_completion.py b/endpoints/OAI/utils/chat_completion.py index 2d7a09d7..022ce822 100644 --- a/endpoints/OAI/utils/chat_completion.py +++ b/endpoints/OAI/utils/chat_completion.py @@ -1,4 +1,5 @@ """Chat completion utilities for OAI server.""" + import pathlib from typing import Optional from uuid import uuid4 diff --git a/endpoints/OAI/utils/completion.py b/endpoints/OAI/utils/completion.py index 70672a1d..ec687fdf 100644 --- a/endpoints/OAI/utils/completion.py +++ b/endpoints/OAI/utils/completion.py @@ -1,4 +1,5 @@ """Completion utilities for OAI server.""" + import pathlib from fastapi import HTTPException, Request from fastapi.concurrency import run_in_threadpool diff --git a/start.py b/start.py index ec992998..82655c78 100644 --- a/start.py +++ b/start.py @@ -1,4 +1,5 @@ """Utility to automatically upgrade and start the API""" + import asyncio import argparse import os diff --git a/tests/model_test.py b/tests/model_test.py index b47449ee..662ccbc5 100644 --- a/tests/model_test.py +++ b/tests/model_test.py @@ -1,4 +1,5 @@ -""" Test the model container. """ +"""Test the model container.""" + from backends.exllamav2.model import ModelContainer diff --git a/tests/wheel_test.py b/tests/wheel_test.py index 97628f6b..1fcd9be8 100644 --- a/tests/wheel_test.py +++ b/tests/wheel_test.py @@ -1,4 +1,4 @@ -""" Test if the wheels are installed correctly. """ +"""Test if the wheels are installed correctly.""" from importlib.metadata import version from importlib.util import find_spec