[Misc] Add SPDX-License-Identifier headers to python source files (#12628)

- **Add SPDX license headers to python source files**
- **Check for SPDX headers using pre-commit**

commit 9d7ef44c3cfb72ca4c32e1c677d99259d10d4745
Author: Russell Bryant <rbryant@redhat.com>
Date:   Fri Jan 31 14:18:24 2025 -0500

    Add SPDX license headers to python source files
    
This commit adds SPDX license headers to python source files as
recommended to
the project by the Linux Foundation. These headers provide a concise way
that is
both human and machine readable for communicating license information
for each
source file. It helps avoid any ambiguity about the license of the code
and can
    also be easily used by tools to help manage license compliance.
    
The Linux Foundation runs license scans against the codebase to help
ensure
    we are in compliance with the licenses of the code we use, including
dependencies. Having these headers in place helps that tool do its job.
    
    More information can be found on the SPDX site:
    
    - https://spdx.dev/learn/handling-license-info/
    
    Signed-off-by: Russell Bryant <rbryant@redhat.com>

commit 5a1cf1cb3b80759131c73f6a9dddebccac039dea
Author: Russell Bryant <rbryant@redhat.com>
Date:   Fri Jan 31 14:36:32 2025 -0500

    Check for SPDX headers using pre-commit
    
    Signed-off-by: Russell Bryant <rbryant@redhat.com>

---------

Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
Russell Bryant
2025-02-02 11:58:18 -08:00
committed by GitHub
parent f256ebe4df
commit e489ad7a21
1012 changed files with 1884 additions and 2 deletions
+1
View File
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
"""
NOTE: This API server is used only for demonstrating usage of AsyncEngine
and simple performance benchmarks. It is not intended for production use.
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import codecs
import json
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import signal
from http import HTTPStatus
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import itertools
import warnings
from contextlib import contextmanager
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from typing import List, Optional, Union
from vllm.logger import init_logger
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import atexit
import gc
+1
View File
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
"""
This file contains the command line arguments for the vLLM's
OpenAI-compatible server. It is kept in a separate file for documentation
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from functools import lru_cache, partial
from typing import Dict, FrozenSet, Iterable, List, Optional, Union
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Adapted from
# https://github.com/lm-sys/FastChat/blob/168ccc29d3f7edc50823016105c024fe2282732a/fastchat/protocol/openai_api_protocol.py
import re
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from .abs_reasoning_parsers import ReasoningParser, ReasoningParserManager
from .deepseek_r1_reasoning_parser import DeepSeekR1ReasoningParser
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import os
from functools import cached_property
from typing import Callable, Dict, List, Optional, Sequence, Tuple, Type, Union
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import re
from typing import Optional, Sequence, Tuple, Union
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
from http import HTTPStatus
from io import StringIO
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import json
import time
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import time
from typing import AsyncGenerator, AsyncIterator, Dict, List, Optional
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import base64
import time
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import json
from concurrent.futures.thread import ThreadPoolExecutor
from http import HTTPStatus
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import json
import pathlib
from dataclasses import dataclass
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import base64
import time
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
from typing import Any, AsyncGenerator, Dict, List, Optional, Union, cast
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import time
from typing import Any, AsyncGenerator, Dict, List, Optional, Union, cast
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from typing import Final, List, Optional, Union
from fastapi import Request
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from .abstract_tool_parser import ToolParser, ToolParserManager
from .granite_20b_fc_tool_parser import Granite20bFCToolParser
from .granite_tool_parser import GraniteToolParser
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import os
from functools import cached_property
from typing import Callable, Dict, List, Optional, Sequence, Type, Union
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import json
import re
from json import JSONDecoder
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import json
from typing import Dict, Sequence, Union
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import json
import re
from typing import Dict, List, Sequence, Union
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import json
from typing import Dict, Sequence, Union
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import json
import re
from typing import Dict, List, Sequence, Union
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import json
import re
from json import JSONDecoder
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import json
import re
from random import choices
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import ast
import json
import re
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import json
from json import JSONDecodeError, JSONDecoder
from typing import Any, List, Tuple
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import functools