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
import functools import functools
from typing import Dict, List, Tuple from typing import Dict, List, Tuple
......
# SPDX-License-Identifier: Apache-2.0
# Adapted from: https://github.com/huggingface/peft/blob/main/src/peft/tuners/lora/config.py # Adapted from: https://github.com/huggingface/peft/blob/main/src/peft/tuners/lora/config.py
import json import json
......
# SPDX-License-Identifier: Apache-2.0
from vllm.lora.punica_wrapper.punica_base import PunicaWrapperBase from vllm.lora.punica_wrapper.punica_base import PunicaWrapperBase
from vllm.lora.punica_wrapper.punica_selector import get_punica_wrapper from vllm.lora.punica_wrapper.punica_selector import get_punica_wrapper
......
# SPDX-License-Identifier: Apache-2.0
""" """
Based on: Based on:
Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023). Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023).
......
# SPDX-License-Identifier: Apache-2.0
from typing import Callable, Optional, Tuple, Union from typing import Callable, Optional, Tuple, Union
import torch import torch
......
# SPDX-License-Identifier: Apache-2.0
""" """
Based on: Based on:
Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023). Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023).
......
# SPDX-License-Identifier: Apache-2.0
from typing import Optional, Tuple, Union, final from typing import Optional, Tuple, Union, final
import torch import torch
......
# SPDX-License-Identifier: Apache-2.0
from vllm.logger import init_logger from vllm.logger import init_logger
from vllm.platforms import current_platform from vllm.platforms import current_platform
from vllm.utils import resolve_obj_by_qualname from vllm.utils import resolve_obj_by_qualname
......
# SPDX-License-Identifier: Apache-2.0
from typing import TYPE_CHECKING, List, Optional, Tuple, Union from typing import TYPE_CHECKING, List, Optional, Tuple, Union
import torch import torch
......
# SPDX-License-Identifier: Apache-2.0
import warnings import warnings
from typing import Optional from typing import Optional
......
# SPDX-License-Identifier: Apache-2.0
import os import os
import re import re
from typing import List, Optional, Set, Tuple, Type, Union from typing import List, Optional, Set, Tuple, Type, Union
......
# SPDX-License-Identifier: Apache-2.0
from contextlib import contextmanager from contextlib import contextmanager
from typing import Any, Dict, List, Literal, Optional, Set, Type, Union from typing import Any, Dict, List, Literal, Optional, Set, Type, Union
......
# SPDX-License-Identifier: Apache-2.0
from vllm.model_executor.parameter import (BasevLLMParameter, from vllm.model_executor.parameter import (BasevLLMParameter,
PackedvLLMParameter) PackedvLLMParameter)
from vllm.model_executor.sampling_metadata import (SamplingMetadata, from vllm.model_executor.sampling_metadata import (SamplingMetadata,
......
# SPDX-License-Identifier: Apache-2.0
from typing import Dict, Type from typing import Dict, Type
import torch.nn as nn import torch.nn as nn
......
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations from __future__ import annotations
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
......
# SPDX-License-Identifier: Apache-2.0
from dataclasses import dataclass from dataclasses import dataclass
from typing import Dict, List, Optional, TypedDict, Union from typing import Dict, List, Optional, TypedDict, Union
......
# SPDX-License-Identifier: Apache-2.0
from functools import lru_cache from functools import lru_cache
from json import loads as json_loads from json import loads as json_loads
from typing import Optional, Union from typing import Optional, Union
......
# SPDX-License-Identifier: Apache-2.0
import asyncio import asyncio
import concurrent.futures import concurrent.futures
import os import os
......
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024- the Outlines developers # Copyright 2024- the Outlines developers
# This file is adapted from # This file is adapted from
# https://github.com/outlines-dev/outlines/blob/main/outlines/serve/vllm.py # https://github.com/outlines-dev/outlines/blob/main/outlines/serve/vllm.py
......
# SPDX-License-Identifier: Apache-2.0
import re import re
......
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