[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
"""Attention layer with FlashAttention."""
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple, Type
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from typing import TYPE_CHECKING, Dict, List, Set, Tuple
from vllm.logger import init_logger
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from collections import defaultdict
from typing import DefaultDict, Dict, Iterable, List, Optional, Tuple
+1
View File
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
"""KV-Cache Utilities."""
from collections.abc import Sequence
from dataclasses import dataclass
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from collections import deque
from dataclasses import dataclass
from typing import (TYPE_CHECKING, Deque, Dict, Iterable, List, Optional, Set,
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import enum
from dataclasses import dataclass
from typing import TYPE_CHECKING, List, Optional, Union
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import os
from typing import AsyncGenerator, List, Mapping, Optional, Type, Union
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import pickle
import queue
import signal
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
import os
import signal
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from dataclasses import dataclass
from typing import List, Optional, Union
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from typing import Dict, List, Mapping, Optional, Type, Union
from typing_extensions import TypeVar
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from typing import Any, Dict, List, Optional
from vllm.config import ModelConfig
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import asyncio
from dataclasses import dataclass
from typing import Dict, List, Optional
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import time
from typing import Mapping, Optional, Union
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from typing import Type
from vllm.config import VllmConfig
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import os
import pickle
import signal
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from dataclasses import dataclass
from typing import Dict, List
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import time
from abc import ABC, abstractmethod
from typing import List
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import time
from dataclasses import dataclass
from typing import TYPE_CHECKING, List
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from dataclasses import dataclass
from typing import Dict, List, Optional
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import enum
from typing import TYPE_CHECKING, List, Optional, Union
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from dataclasses import dataclass
from typing import Dict, List, Optional, Set
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from typing import List, Set, Tuple
import torch
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from typing import Dict
import torch
+1
View File
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
"""A layer that samples the next tokens from the model's outputs."""
from typing import Tuple
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import pickle
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import time
from dataclasses import dataclass
from dataclasses import field as dataclass_field
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import multiprocessing
import os
import weakref
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from typing import List
import numpy as np
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Datastructures defining an input batch
from dataclasses import dataclass
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import gc
import time
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, cast
+1
View File
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
"""A GPU worker class."""
import gc
import os