From ff653503ffdbcf96c14c6454ae382d843e184b01 Mon Sep 17 00:00:00 2001 From: Echo-Nie <157974576+Echo-Nie@users.noreply.github.com> Date: Wed, 12 Nov 2025 10:44:09 +0800 Subject: [PATCH] [Docs] Add License in Unittest (#4957) * add copyright * add CopyRight --- tests/e2e/test_api_key.py | 16 ++++++++++++++++ tests/engine/test_kv_cache_interface.py | 16 ++++++++++++++++ tests/entrypoints/test_engine_client.py | 16 ++++++++++++++++ .../test_cuda_graph_recapture.py | 16 ++++++++++++++++ tests/layers/test_activation.py | 16 ++++++++++++++++ tests/layers/test_ffn.py | 16 ++++++++++++++++ tests/layers/test_fusedmoe.py | 16 ++++++++++++++++ tests/layers/test_moba_attention_backend.py | 16 ++++++++++++++++ tests/layers/test_native_paddle_backend.py | 16 ++++++++++++++++ tests/metrics/test_new_metrics.py | 16 ++++++++++++++++ tests/model_executor/test_logits_processor.py | 16 ++++++++++++++++ .../test_dynamic_per_token_scaled_fp8_quant.py | 16 ++++++++++++++++ tests/operators/test_flash_mask_attn.py | 16 ++++++++++++++++ tests/operators/test_fused_hadamard_quant_fp8.py | 16 ++++++++++++++++ tests/operators/test_hybrid_mtp_ngram.py | 16 ++++++++++++++++ tests/operators/test_masked_per_token_quant.py | 16 ++++++++++++++++ tests/operators/test_noaux_tc.py | 16 ++++++++++++++++ tests/operators/test_per_token_quant.py | 16 ++++++++++++++++ tests/operators/test_pre_cache_len_concat.py | 16 ++++++++++++++++ tests/operators/test_rebuild_padding.py | 16 ++++++++++++++++ .../operators/test_speculative_schedule_cache.py | 16 ++++++++++++++++ tests/operators/test_top_p_candidates.py | 16 ++++++++++++++++ tests/operators/test_tree_mask.py | 16 ++++++++++++++++ tests/operators/test_update_attn_mask.py | 16 ++++++++++++++++ tests/output/test_pooler.py | 16 ++++++++++++++++ tests/output/test_process_batch_output.py | 16 ++++++++++++++++ tests/output/test_stream_transfer_data.py | 16 ++++++++++++++++ tests/platforms/test_utils.py | 16 ++++++++++++++++ tests/quantization/test_w4a8.py | 16 ++++++++++++++++ tests/quantization/test_w4afp8.py | 16 ++++++++++++++++ tests/utils/test_config.py | 16 ++++++++++++++++ tests/utils/test_custom_chat_template.py | 16 ++++++++++++++++ tests/utils/test_download.py | 16 ++++++++++++++++ tests/utils/test_exception_handler.py | 16 ++++++++++++++++ tests/utils/test_run_batch_tools.py | 16 ++++++++++++++++ tests/utils/test_version.py | 16 ++++++++++++++++ tests/v1/test_schedule_output.py | 16 ++++++++++++++++ 37 files changed, 592 insertions(+) diff --git a/tests/e2e/test_api_key.py b/tests/e2e/test_api_key.py index 0083972f18..56dd57782d 100644 --- a/tests/e2e/test_api_key.py +++ b/tests/e2e/test_api_key.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import os import signal import subprocess diff --git a/tests/engine/test_kv_cache_interface.py b/tests/engine/test_kv_cache_interface.py index 69d0f9f8ad..40f21d5320 100644 --- a/tests/engine/test_kv_cache_interface.py +++ b/tests/engine/test_kv_cache_interface.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from fastdeploy.engine.kv_cache_interface import AttentionSpec, KVCacheSpec diff --git a/tests/entrypoints/test_engine_client.py b/tests/entrypoints/test_engine_client.py index 2493bb44d9..b3e6e75bfd 100644 --- a/tests/entrypoints/test_engine_client.py +++ b/tests/entrypoints/test_engine_client.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest.mock import MagicMock, patch diff --git a/tests/graph_optimization/test_cuda_graph_recapture.py b/tests/graph_optimization/test_cuda_graph_recapture.py index 0c0f40fa05..85516f8bd3 100644 --- a/tests/graph_optimization/test_cuda_graph_recapture.py +++ b/tests/graph_optimization/test_cuda_graph_recapture.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest.mock import Mock diff --git a/tests/layers/test_activation.py b/tests/layers/test_activation.py index 9a39bc1a61..70f011d396 100644 --- a/tests/layers/test_activation.py +++ b/tests/layers/test_activation.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest.mock import patch diff --git a/tests/layers/test_ffn.py b/tests/layers/test_ffn.py index ffb96060b9..5bce5250ef 100644 --- a/tests/layers/test_ffn.py +++ b/tests/layers/test_ffn.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import json import os import shutil diff --git a/tests/layers/test_fusedmoe.py b/tests/layers/test_fusedmoe.py index c64ff0dd0e..6831c14692 100644 --- a/tests/layers/test_fusedmoe.py +++ b/tests/layers/test_fusedmoe.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import json import os import shutil diff --git a/tests/layers/test_moba_attention_backend.py b/tests/layers/test_moba_attention_backend.py index 7b0d24e618..4e88201572 100644 --- a/tests/layers/test_moba_attention_backend.py +++ b/tests/layers/test_moba_attention_backend.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest.mock import patch diff --git a/tests/layers/test_native_paddle_backend.py b/tests/layers/test_native_paddle_backend.py index 9823f4ecc6..a5aeb485d3 100644 --- a/tests/layers/test_native_paddle_backend.py +++ b/tests/layers/test_native_paddle_backend.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest.mock import Mock diff --git a/tests/metrics/test_new_metrics.py b/tests/metrics/test_new_metrics.py index bbcaba3fc6..c1bbcd67be 100644 --- a/tests/metrics/test_new_metrics.py +++ b/tests/metrics/test_new_metrics.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest.mock import MagicMock, patch diff --git a/tests/model_executor/test_logits_processor.py b/tests/model_executor/test_logits_processor.py index 4d41e23212..e26b1736e2 100644 --- a/tests/model_executor/test_logits_processor.py +++ b/tests/model_executor/test_logits_processor.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import random import unittest from unittest.mock import Mock diff --git a/tests/operators/test_dynamic_per_token_scaled_fp8_quant.py b/tests/operators/test_dynamic_per_token_scaled_fp8_quant.py index 785270ac99..38bf4a94ed 100644 --- a/tests/operators/test_dynamic_per_token_scaled_fp8_quant.py +++ b/tests/operators/test_dynamic_per_token_scaled_fp8_quant.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import numpy as np diff --git a/tests/operators/test_flash_mask_attn.py b/tests/operators/test_flash_mask_attn.py index 07be157697..d7849406d2 100644 --- a/tests/operators/test_flash_mask_attn.py +++ b/tests/operators/test_flash_mask_attn.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import numpy as np diff --git a/tests/operators/test_fused_hadamard_quant_fp8.py b/tests/operators/test_fused_hadamard_quant_fp8.py index 03a513d16a..f0f02e9101 100644 --- a/tests/operators/test_fused_hadamard_quant_fp8.py +++ b/tests/operators/test_fused_hadamard_quant_fp8.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import paddle diff --git a/tests/operators/test_hybrid_mtp_ngram.py b/tests/operators/test_hybrid_mtp_ngram.py index c8b16d02a1..6c111f9376 100644 --- a/tests/operators/test_hybrid_mtp_ngram.py +++ b/tests/operators/test_hybrid_mtp_ngram.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import numpy as np diff --git a/tests/operators/test_masked_per_token_quant.py b/tests/operators/test_masked_per_token_quant.py index 22a436a176..f0bdf525ea 100644 --- a/tests/operators/test_masked_per_token_quant.py +++ b/tests/operators/test_masked_per_token_quant.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import os import unittest diff --git a/tests/operators/test_noaux_tc.py b/tests/operators/test_noaux_tc.py index b0193ac3c9..f695b85664 100644 --- a/tests/operators/test_noaux_tc.py +++ b/tests/operators/test_noaux_tc.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import paddle diff --git a/tests/operators/test_per_token_quant.py b/tests/operators/test_per_token_quant.py index bcdab76f76..23972ce53c 100644 --- a/tests/operators/test_per_token_quant.py +++ b/tests/operators/test_per_token_quant.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import numpy as np diff --git a/tests/operators/test_pre_cache_len_concat.py b/tests/operators/test_pre_cache_len_concat.py index dd2fc8dcc4..4844c1c712 100644 --- a/tests/operators/test_pre_cache_len_concat.py +++ b/tests/operators/test_pre_cache_len_concat.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import numpy as np diff --git a/tests/operators/test_rebuild_padding.py b/tests/operators/test_rebuild_padding.py index 70552bd096..d87c4b203a 100644 --- a/tests/operators/test_rebuild_padding.py +++ b/tests/operators/test_rebuild_padding.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import numpy as np diff --git a/tests/operators/test_speculative_schedule_cache.py b/tests/operators/test_speculative_schedule_cache.py index 50a0e7cab1..6481cfacf0 100644 --- a/tests/operators/test_speculative_schedule_cache.py +++ b/tests/operators/test_speculative_schedule_cache.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import numpy as np diff --git a/tests/operators/test_top_p_candidates.py b/tests/operators/test_top_p_candidates.py index 36ff300368..95f5f0cc45 100644 --- a/tests/operators/test_top_p_candidates.py +++ b/tests/operators/test_top_p_candidates.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import numpy as np diff --git a/tests/operators/test_tree_mask.py b/tests/operators/test_tree_mask.py index b3df9750aa..1cfbaaf7a5 100644 --- a/tests/operators/test_tree_mask.py +++ b/tests/operators/test_tree_mask.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import math import time import unittest diff --git a/tests/operators/test_update_attn_mask.py b/tests/operators/test_update_attn_mask.py index e6abca69a8..01b4a56d74 100644 --- a/tests/operators/test_update_attn_mask.py +++ b/tests/operators/test_update_attn_mask.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import os import unittest diff --git a/tests/output/test_pooler.py b/tests/output/test_pooler.py index 42c33affc6..677b26da2c 100644 --- a/tests/output/test_pooler.py +++ b/tests/output/test_pooler.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import numpy as np diff --git a/tests/output/test_process_batch_output.py b/tests/output/test_process_batch_output.py index a205aa7526..6f8b68b9e8 100644 --- a/tests/output/test_process_batch_output.py +++ b/tests/output/test_process_batch_output.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import random import time import unittest diff --git a/tests/output/test_stream_transfer_data.py b/tests/output/test_stream_transfer_data.py index c35db77135..e3ddb3a625 100644 --- a/tests/output/test_stream_transfer_data.py +++ b/tests/output/test_stream_transfer_data.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest import numpy as np diff --git a/tests/platforms/test_utils.py b/tests/platforms/test_utils.py index 3c25d4587f..791d765451 100644 --- a/tests/platforms/test_utils.py +++ b/tests/platforms/test_utils.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest.mock import patch diff --git a/tests/quantization/test_w4a8.py b/tests/quantization/test_w4a8.py index 504b0cd489..d9c328a0df 100644 --- a/tests/quantization/test_w4a8.py +++ b/tests/quantization/test_w4a8.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest import mock diff --git a/tests/quantization/test_w4afp8.py b/tests/quantization/test_w4afp8.py index 2bb002093f..97669acf24 100644 --- a/tests/quantization/test_w4afp8.py +++ b/tests/quantization/test_w4afp8.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest import mock diff --git a/tests/utils/test_config.py b/tests/utils/test_config.py index d296c1c856..82f06ef0ea 100644 --- a/tests/utils/test_config.py +++ b/tests/utils/test_config.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest.mock import Mock diff --git a/tests/utils/test_custom_chat_template.py b/tests/utils/test_custom_chat_template.py index 4ca3294597..8079ba2034 100644 --- a/tests/utils/test_custom_chat_template.py +++ b/tests/utils/test_custom_chat_template.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import os import unittest from pathlib import Path diff --git a/tests/utils/test_download.py b/tests/utils/test_download.py index 19949f8acd..52e364f2cc 100644 --- a/tests/utils/test_download.py +++ b/tests/utils/test_download.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import os import unittest diff --git a/tests/utils/test_exception_handler.py b/tests/utils/test_exception_handler.py index e9bd034ea5..0142347c39 100644 --- a/tests/utils/test_exception_handler.py +++ b/tests/utils/test_exception_handler.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import json import unittest from http import HTTPStatus diff --git a/tests/utils/test_run_batch_tools.py b/tests/utils/test_run_batch_tools.py index a257f95288..5ed8781a3f 100644 --- a/tests/utils/test_run_batch_tools.py +++ b/tests/utils/test_run_batch_tools.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import argparse import unittest from unittest.mock import MagicMock, patch diff --git a/tests/utils/test_version.py b/tests/utils/test_version.py index ddbd28992c..ec95cb4192 100644 --- a/tests/utils/test_version.py +++ b/tests/utils/test_version.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + import unittest from unittest.mock import patch diff --git a/tests/v1/test_schedule_output.py b/tests/v1/test_schedule_output.py index 88988022d0..79fcca5b1e 100644 --- a/tests/v1/test_schedule_output.py +++ b/tests/v1/test_schedule_output.py @@ -1,3 +1,19 @@ +""" +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" + from dataclasses import asdict from types import SimpleNamespace