Unverified Commit e489ad7a authored by Russell Bryant's avatar Russell Bryant Committed by GitHub
Browse files

[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 ...
parent f256ebe4
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 The vLLM team. # Copyright 2023 The vLLM team.
# Adapted from # Adapted from
# https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/core/tensor_parallel/utils.py # https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/core/tensor_parallel/utils.py
......
# SPDX-License-Identifier: Apache-2.0
import argparse import argparse
import dataclasses import dataclasses
import json import json
......
# SPDX-License-Identifier: Apache-2.0
import asyncio import asyncio
import copy import copy
import time import time
......
# SPDX-License-Identifier: Apache-2.0
# Workaround for https://github.com/python/cpython/issues/86296 # Workaround for https://github.com/python/cpython/issues/86296
# #
# From https://github.com/aio-libs/async-timeout/blob/master/async_timeout/__init__.py # From https://github.com/aio-libs/async-timeout/blob/master/async_timeout/__init__.py
......
# SPDX-License-Identifier: Apache-2.0
import copy import copy
import time import time
from collections import Counter as collectionsCounter from collections import Counter as collectionsCounter
......
# SPDX-License-Identifier: Apache-2.0
import time import time
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
from typing import Counter as CollectionsCounter from typing import Counter as CollectionsCounter
......
# SPDX-License-Identifier: Apache-2.0
""" """
These types are defined in this file to avoid importing vllm.engine.metrics These types are defined in this file to avoid importing vllm.engine.metrics
and therefore importing prometheus_client. and therefore importing prometheus_client.
......
# SPDX-License-Identifier: Apache-2.0
import uuid import uuid
from dataclasses import dataclass, field from dataclasses import dataclass, field
from enum import Enum from enum import Enum
......
# SPDX-License-Identifier: Apache-2.0
import asyncio import asyncio
import copy import copy
import pickle import pickle
......
# SPDX-License-Identifier: Apache-2.0
import pickle import pickle
import signal import signal
from contextlib import contextmanager from contextlib import contextmanager
......
# SPDX-License-Identifier: Apache-2.0
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import Callable, List from typing import Callable, List
......
# SPDX-License-Identifier: Apache-2.0
import functools import functools
from typing import Callable, List, cast from typing import Callable, List, cast
......
# SPDX-License-Identifier: Apache-2.0
from typing import List from typing import List
from vllm.config import SchedulerConfig from vllm.config import SchedulerConfig
......
# SPDX-License-Identifier: Apache-2.0
from typing import Callable, List, Optional, Tuple from typing import Callable, List, Optional, Tuple
from vllm.lora.request import LoRARequest from vllm.lora.request import LoRARequest
......
# SPDX-License-Identifier: Apache-2.0
from typing import List from typing import List
from typing import Sequence as GenericSequence from typing import Sequence as GenericSequence
from typing import cast from typing import cast
......
# SPDX-License-Identifier: Apache-2.0
import asyncio import asyncio
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import AsyncGenerator, List, Mapping, Optional from typing import AsyncGenerator, List, Mapping, Optional
......
# SPDX-License-Identifier: Apache-2.0
""" """
NOTE: This API server is used only for demonstrating usage of AsyncEngine NOTE: This API server is used only for demonstrating usage of AsyncEngine
and simple performance benchmarks. It is not intended for production use. and simple performance benchmarks. It is not intended for production use.
......
# SPDX-License-Identifier: Apache-2.0
import asyncio import asyncio
import codecs import codecs
import json import json
......
# SPDX-License-Identifier: Apache-2.0
import asyncio import asyncio
import signal import signal
from http import HTTPStatus from http import HTTPStatus
......
# SPDX-License-Identifier: Apache-2.0
import itertools import itertools
import warnings import warnings
from contextlib import contextmanager from contextlib import contextmanager
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment