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 the SPDX site:
    
    - https://spdx.dev/learn/handling-license-info/

Signed-off-by: default avatarRussell 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: default avatarRussell Bryant <rbryant@redhat.com>

---------
Signed-off-by: default avatarRussell Bryant <rbryant@redhat.com>
parent f256ebe4
# SPDX-License-Identifier: Apache-2.0
from typing import List, Optional, Set, Tuple from typing import List, Optional, Set, Tuple
import torch import torch
......
# SPDX-License-Identifier: Apache-2.0
from vllm.sequence import (ExecuteModelRequest, SequenceData, from vllm.sequence import (ExecuteModelRequest, SequenceData,
SequenceGroupMetadata, get_all_seq_ids) SequenceGroupMetadata, get_all_seq_ids)
from vllm.spec_decode.interfaces import (SpeculativeProposals, from vllm.spec_decode.interfaces import (SpeculativeProposals,
......
# SPDX-License-Identifier: Apache-2.0
import copy import copy
import weakref import weakref
from typing import Dict, List, Set, Tuple from typing import Dict, List, Set, Tuple
......
# SPDX-License-Identifier: Apache-2.0
import weakref import weakref
from typing import List, Optional, Set, Tuple from typing import List, Optional, Set, Tuple
......
# SPDX-License-Identifier: Apache-2.0
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import List, Optional, Set, Tuple from typing import List, Optional, Set, Tuple
......
# SPDX-License-Identifier: Apache-2.0
from typing import List, Optional, Set, Tuple from typing import List, Optional, Set, Tuple
import torch import torch
......
# SPDX-License-Identifier: Apache-2.0
import copy import copy
from collections import defaultdict from collections import defaultdict
from functools import cached_property from functools import cached_property
......
# SPDX-License-Identifier: Apache-2.0
from typing import List, Optional from typing import List, Optional
from vllm.sequence import SequenceGroupMetadata from vllm.sequence import SequenceGroupMetadata
......
# SPDX-License-Identifier: Apache-2.0
from typing import List, Optional, Set, Tuple from typing import List, Optional, Set, Tuple
import torch import torch
......
# SPDX-License-Identifier: Apache-2.0
import time import time
from contextlib import contextmanager from contextlib import contextmanager
from typing import Dict, List, Optional, Sequence, Tuple from typing import Dict, List, Optional, Sequence, Tuple
......
# SPDX-License-Identifier: Apache-2.0
import os import os
from typing import Mapping, Optional from typing import Mapping, Optional
......
# SPDX-License-Identifier: Apache-2.0
from vllm.envs import VLLM_USE_MODELSCOPE from vllm.envs import VLLM_USE_MODELSCOPE
if VLLM_USE_MODELSCOPE: if VLLM_USE_MODELSCOPE:
......
# SPDX-License-Identifier: Apache-2.0
import enum import enum
import json import json
import os import os
......
# SPDX-License-Identifier: Apache-2.0
from vllm.transformers_utils.configs.chatglm import ChatGLMConfig from vllm.transformers_utils.configs.chatglm import ChatGLMConfig
from vllm.transformers_utils.configs.cohere2 import Cohere2Config from vllm.transformers_utils.configs.cohere2 import Cohere2Config
from vllm.transformers_utils.configs.dbrx import DbrxConfig from vllm.transformers_utils.configs.dbrx import DbrxConfig
......
# SPDX-License-Identifier: Apache-2.0
# yapf: disable # yapf: disable
# ruff: noqa: E501 # ruff: noqa: E501
# coding=utf-8 # coding=utf-8
......
# SPDX-License-Identifier: Apache-2.0
# Adapted from # Adapted from
# https://github.com/THUDM/ChatGLM2-6B # https://github.com/THUDM/ChatGLM2-6B
from transformers import PretrainedConfig from transformers import PretrainedConfig
......
# SPDX-License-Identifier: Apache-2.0
# ruff: noqa # ruff: noqa
# Adapted from # Adapted from
......
# SPDX-License-Identifier: Apache-2.0
# yapf: disable # yapf: disable
# ruff: noqa: E501 # ruff: noqa: E501
# coding=utf-8 # coding=utf-8
......
# SPDX-License-Identifier: Apache-2.0
# adapted from https://github.com/deepseek-ai/DeepSeek-VL2/blob/faf18023f24b962b32d9f0a2d89e402a8d383a78/deepseek_vl2/models/modeling_deepseek_vl_v2.py#L115-L268 # adapted from https://github.com/deepseek-ai/DeepSeek-VL2/blob/faf18023f24b962b32d9f0a2d89e402a8d383a78/deepseek_vl2/models/modeling_deepseek_vl_v2.py#L115-L268
from typing import Tuple from typing import Tuple
......
# SPDX-License-Identifier: Apache-2.0
import os import os
from typing import Optional, Union from typing import Optional, Union
......
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