From 6bd6cad7a0f85d468cdefe5ba45fab794abe5034 Mon Sep 17 00:00:00 2001 From: Zhong Hui Date: Wed, 14 Sep 2022 10:43:59 +0800 Subject: [PATCH 1/2] add copyright. --- .copyright.hook | 2 +- examples/dialogue/dgu/args.py | 14 ++++++++++++++ examples/dialogue/dgu/data.py | 14 ++++++++++++++ examples/dialogue/dgu/main.py | 14 ++++++++++++++ examples/dialogue/dgu/metric.py | 14 ++++++++++++++ examples/dialogue/lic2021_baseline/args.py | 16 +++++++++++++++- examples/dialogue/lic2021_baseline/data.py | 14 ++++++++++++++ examples/dialogue/lic2021_baseline/finetune.py | 14 ++++++++++++++ examples/dialogue/lic2021_baseline/infer.py | 14 ++++++++++++++ examples/dialogue/plato-2/interaction.py | 14 ++++++++++++++ examples/dialogue/plato-2/model.py | 14 ++++++++++++++ .../dialogue/unified_transformer/finetune.py | 14 ++++++++++++++ examples/dialogue/unified_transformer/infer.py | 14 ++++++++++++++ .../unified_transformer/interaction.py | 14 ++++++++++++++ examples/dialogue/unified_transformer/utils.py | 14 ++++++++++++++ examples/few_shot/pet/pet.py | 14 ++++++++++++++ .../information_extraction/DuUIE/inference.py | 15 +++++++++++++++ .../DuUIE/process_data.py | 15 +++++++++++++++ .../DuUIE/run_seq2struct.py | 15 +++++++++++++++ .../DuUIE/uie/__init__.py | 16 +++++++++++++++- .../DuUIE/uie/evaluation/__init__.py | 16 +++++++++++++++- .../DuUIE/uie/evaluation/constants.py | 14 ++++++++++++++ .../DuUIE/uie/evaluation/scorer.py | 15 +++++++++++++++ .../DuUIE/uie/evaluation/sel2record.py | 15 +++++++++++++++ .../DuUIE/uie/seq2struct/__init__.py | 14 ++++++++++++++ .../DuUIE/uie/seq2struct/data_collator.py | 15 +++++++++++++++ .../DuUIE/uie/seq2struct/t5_bert_tokenizer.py | 15 +++++++++++++++ .../DuUIE/uie/seq2struct/utils.py | 15 +++++++++++++++ examples/language_model/elmo/args.py | 14 ++++++++++++++ examples/language_model/elmo/dataset.py | 14 ++++++++++++++ examples/language_model/elmo/elmo.py | 14 ++++++++++++++ examples/language_model/elmo/run_eval.py | 14 ++++++++++++++ examples/language_model/elmo/run_finetune.py | 14 ++++++++++++++ examples/language_model/elmo/run_pretrain.py | 14 ++++++++++++++ examples/language_model/elmo/word2vec_base.py | 14 ++++++++++++++ model_zoo/electra/deploy/lite/prepare.py | 14 ++++++++++++++ model_zoo/electra/deploy/python/predict.py | 14 ++++++++++++++ model_zoo/electra/deploy/serving/client.py | 14 ++++++++++++++ .../covert_inference_model_to_serving.py | 14 ++++++++++++++ .../converter/params_static_to_dygraph.py | 14 ++++++++++++++ .../models/ernie_seqcls_postprocess/1/model.py | 14 ++++++++++++++ .../ernie_tokencls_postprocess/1/model.py | 14 ++++++++++++++ .../triton/models/ernie_tokenizer/1/model.py | 14 ++++++++++++++ .../deploy/triton/seq_cls_grpc_client.py | 14 ++++++++++++++ .../deploy/triton/token_cls_grpc_client.py | 14 ++++++++++++++ model_zoo/ernie-health/cblue/model.py | 14 ++++++++++++++ model_zoo/ernie-health/cblue/train_ner.py | 14 ++++++++++++++ model_zoo/gpt/run_generation.py | 14 ++++++++++++++ model_zoo/uie/labelstudio2doccano.py | 14 ++++++++++++++ paddlenlp/data/iterator.py | 16 +++++++++++++++- paddlenlp/datasets/bq_corpus.py | 14 ++++++++++++++ paddlenlp/datasets/hf_datasets/__init__.py | 13 +++++++++++++ paddlenlp/datasets/hf_datasets/squad_v2.py | 13 +++++++++++++ paddlenlp/datasets/wmt14ende.py | 14 ++++++++++++++ paddlenlp/metrics/chunk.py | 14 ++++++++++++++ paddlenlp/metrics/dureader.py | 13 +++++++++++++ paddlenlp/taskflow/__init__.py | 14 ++++++++++++++ paddlenlp/taskflow/models/__init__.py | 14 ++++++++++++++ paddlenlp/transformers/albert/__init__.py | 13 +++++++++++++ paddlenlp/transformers/artist/__init__.py | 13 +++++++++++++ paddlenlp/transformers/auto/__init__.py | 13 +++++++++++++ paddlenlp/transformers/bart/__init__.py | 13 +++++++++++++ paddlenlp/transformers/bert/__init__.py | 13 +++++++++++++ .../transformers/bert_japanese/__init__.py | 13 +++++++++++++ paddlenlp/transformers/bigbird/__init__.py | 13 +++++++++++++ paddlenlp/transformers/blenderbot/__init__.py | 14 +++++++++++++- .../transformers/blenderbot_small/__init__.py | 14 +++++++++++++- paddlenlp/transformers/chinesebert/__init__.py | 13 +++++++++++++ paddlenlp/transformers/clip/__init__.py | 13 +++++++++++++ paddlenlp/transformers/codegen/__init__.py | 13 +++++++++++++ paddlenlp/transformers/convbert/__init__.py | 14 ++++++++++++++ paddlenlp/transformers/ctrl/__init__.py | 13 +++++++++++++ paddlenlp/transformers/dallebart/__init__.py | 13 +++++++++++++ paddlenlp/transformers/distilbert/__init__.py | 13 +++++++++++++ paddlenlp/transformers/electra/__init__.py | 13 +++++++++++++ paddlenlp/transformers/ernie/__init__.py | 13 +++++++++++++ .../match_static_to_dygraph.py | 14 ++++++++++++++ paddlenlp/transformers/ernie_ctm/__init__.py | 13 +++++++++++++ paddlenlp/transformers/ernie_doc/__init__.py | 13 +++++++++++++ paddlenlp/transformers/ernie_gen/__init__.py | 13 +++++++++++++ paddlenlp/transformers/ernie_gram/__init__.py | 13 +++++++++++++ .../ernie_gram/matching_param_name.py | 14 ++++++++++++++ paddlenlp/transformers/ernie_m/__init__.py | 13 +++++++++++++ paddlenlp/transformers/ernie_vil/__init__.py | 13 +++++++++++++ paddlenlp/transformers/fnet/__init__.py | 13 +++++++++++++ paddlenlp/transformers/funnel/__init__.py | 14 ++++++++++++++ paddlenlp/transformers/gau_alpha/__init__.py | 14 ++++++++++++++ paddlenlp/transformers/gpt/__init__.py | 13 +++++++++++++ paddlenlp/transformers/gptj/__init__.py | 13 +++++++++++++ .../guided_diffusion_utils/__init__.py | 16 +++++++++++++++- .../gaussian_diffusion.py | 13 +++++++++++++ .../guided_diffusion_utils/losses.py | 13 +++++++++++++ .../guided_diffusion_utils/make_cutouts.py | 13 +++++++++++++ .../guided_diffusion_utils/model_diffusion.py | 13 +++++++++++++ .../guided_diffusion_utils/perlin_noises.py | 13 +++++++++++++ .../guided_diffusion_utils/resize_right.py | 14 ++++++++++++++ .../guided_diffusion_utils/sec_diff.py | 13 +++++++++++++ .../guided_diffusion_utils/transforms.py | 13 +++++++++++++ .../guided_diffusion_utils/unet.py | 13 +++++++++++++ paddlenlp/transformers/layoutlm/__init__.py | 13 +++++++++++++ paddlenlp/transformers/layoutlmv2/__init__.py | 13 +++++++++++++ paddlenlp/transformers/layoutxlm/__init__.py | 13 +++++++++++++ paddlenlp/transformers/luke/__init__.py | 14 ++++++++++++++ paddlenlp/transformers/mbart/__init__.py | 13 +++++++++++++ .../transformers/megatronbert/__init__.py | 14 +++++++++++++- paddlenlp/transformers/mobilebert/__init__.py | 13 +++++++++++++ paddlenlp/transformers/mpnet/__init__.py | 14 ++++++++++++++ paddlenlp/transformers/nezha/__init__.py | 18 ++++++++++++++++-- paddlenlp/transformers/opt/__init__.py | 16 +++++++++++++++- paddlenlp/transformers/ppminilm/__init__.py | 13 +++++++++++++ paddlenlp/transformers/prophetnet/__init__.py | 14 ++++++++++++++ paddlenlp/transformers/reformer/__init__.py | 13 +++++++++++++ paddlenlp/transformers/rembert/__init__.py | 14 +++++++++++++- paddlenlp/transformers/roberta/__init__.py | 13 +++++++++++++ paddlenlp/transformers/roformer/__init__.py | 14 ++++++++++++++ paddlenlp/transformers/roformerv2/__init__.py | 14 ++++++++++++++ .../transformers/semantic_search/__init__.py | 13 +++++++++++++ paddlenlp/transformers/skep/__init__.py | 13 +++++++++++++ paddlenlp/transformers/squeezebert/__init__.py | 13 +++++++++++++ .../stable_diffusion_utils/__init__.py | 14 ++++++++++++++ paddlenlp/transformers/t5/__init__.py | 13 +++++++++++++ paddlenlp/transformers/tinybert/__init__.py | 13 +++++++++++++ paddlenlp/transformers/transformer/__init__.py | 13 +++++++++++++ paddlenlp/transformers/transformer/modeling.py | 14 ++++++++++++++ .../unified_transformer/__init__.py | 13 +++++++++++++ paddlenlp/transformers/unimo/__init__.py | 13 +++++++++++++ paddlenlp/transformers/xlm/__init__.py | 13 +++++++++++++ paddlenlp/transformers/xlnet/__init__.py | 13 +++++++++++++ 128 files changed, 1738 insertions(+), 13 deletions(-) diff --git a/.copyright.hook b/.copyright.hook index 0537474749d6..6a57d7649d64 100644 --- a/.copyright.hook +++ b/.copyright.hook @@ -65,7 +65,7 @@ def _get_comment_mark(path): RE_ENCODE = re.compile(r"^[ \t\v]*#.*?coding[:=]", re.IGNORECASE) -RE_COPYRIGHT = re.compile(r".*Copyright \(c\) \d{4}", re.IGNORECASE) +RE_COPYRIGHT = re.compile(r".*Copyright( \(c\))* \d{4}", re.IGNORECASE) RE_SHEBANG = re.compile(r"^[ \t\v]*#[ \t]?\!") def _check_copyright(path): diff --git a/examples/dialogue/dgu/args.py b/examples/dialogue/dgu/args.py index 26b50c021ce9..0c63a0511a5e 100644 --- a/examples/dialogue/dgu/args.py +++ b/examples/dialogue/dgu/args.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 diff --git a/examples/dialogue/dgu/data.py b/examples/dialogue/dgu/data.py index 498b5777dbe4..315005b77445 100644 --- a/examples/dialogue/dgu/data.py +++ b/examples/dialogue/dgu/data.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 numpy as np from typing import List diff --git a/examples/dialogue/dgu/main.py b/examples/dialogue/dgu/main.py index 4599fd168ce1..732e49b4dda3 100644 --- a/examples/dialogue/dgu/main.py +++ b/examples/dialogue/dgu/main.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 random import time diff --git a/examples/dialogue/dgu/metric.py b/examples/dialogue/dgu/metric.py index 863a46a2b3f7..3472e61aafe3 100644 --- a/examples/dialogue/dgu/metric.py +++ b/examples/dialogue/dgu/metric.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 numpy as np import paddle diff --git a/examples/dialogue/lic2021_baseline/args.py b/examples/dialogue/lic2021_baseline/args.py index e8dc46176df4..46c6d9ac53b3 100644 --- a/examples/dialogue/lic2021_baseline/args.py +++ b/examples/dialogue/lic2021_baseline/args.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 @@ -41,4 +55,4 @@ def print_args(args): print('----------- Configuration Arguments -----------') for arg, value in sorted(vars(args).items()): print('%s: %s' % (arg, value)) - print('------------------------------------------------') \ No newline at end of file + print('------------------------------------------------') diff --git a/examples/dialogue/lic2021_baseline/data.py b/examples/dialogue/lic2021_baseline/data.py index 410ad0be7e25..5c2c06406664 100644 --- a/examples/dialogue/lic2021_baseline/data.py +++ b/examples/dialogue/lic2021_baseline/data.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 numpy as np import gzip diff --git a/examples/dialogue/lic2021_baseline/finetune.py b/examples/dialogue/lic2021_baseline/finetune.py index 592c0fbb5877..a8bf0d9d3760 100644 --- a/examples/dialogue/lic2021_baseline/finetune.py +++ b/examples/dialogue/lic2021_baseline/finetune.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import math diff --git a/examples/dialogue/lic2021_baseline/infer.py b/examples/dialogue/lic2021_baseline/infer.py index f9922f239be7..0e3144f97678 100644 --- a/examples/dialogue/lic2021_baseline/infer.py +++ b/examples/dialogue/lic2021_baseline/infer.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import math diff --git a/examples/dialogue/plato-2/interaction.py b/examples/dialogue/plato-2/interaction.py index f382a79b5f50..f1c0fb22b410 100644 --- a/examples/dialogue/plato-2/interaction.py +++ b/examples/dialogue/plato-2/interaction.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 argparse from collections import namedtuple diff --git a/examples/dialogue/plato-2/model.py b/examples/dialogue/plato-2/model.py index 7671d7b8b2d7..450620c253f3 100644 --- a/examples/dialogue/plato-2/model.py +++ b/examples/dialogue/plato-2/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 collections import namedtuple import paddle diff --git a/examples/dialogue/unified_transformer/finetune.py b/examples/dialogue/unified_transformer/finetune.py index 77418be32ecf..556c9a91144c 100644 --- a/examples/dialogue/unified_transformer/finetune.py +++ b/examples/dialogue/unified_transformer/finetune.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import math diff --git a/examples/dialogue/unified_transformer/infer.py b/examples/dialogue/unified_transformer/infer.py index 454404b1c867..7fea837cf135 100644 --- a/examples/dialogue/unified_transformer/infer.py +++ b/examples/dialogue/unified_transformer/infer.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import argparse diff --git a/examples/dialogue/unified_transformer/interaction.py b/examples/dialogue/unified_transformer/interaction.py index e127b6c44520..036110edb446 100644 --- a/examples/dialogue/unified_transformer/interaction.py +++ b/examples/dialogue/unified_transformer/interaction.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 from termcolor import colored, cprint diff --git a/examples/dialogue/unified_transformer/utils.py b/examples/dialogue/unified_transformer/utils.py index 2b20abf7bfea..68782d94da26 100644 --- a/examples/dialogue/unified_transformer/utils.py +++ b/examples/dialogue/unified_transformer/utils.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 from functools import partial diff --git a/examples/few_shot/pet/pet.py b/examples/few_shot/pet/pet.py index 809ca1e9d30b..e29c5c6650ea 100644 --- a/examples/few_shot/pet/pet.py +++ b/examples/few_shot/pet/pet.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 os import sys diff --git a/examples/information_extraction/DuUIE/inference.py b/examples/information_extraction/DuUIE/inference.py index 5dac259f73bc..b5d89b3a7b9f 100644 --- a/examples/information_extraction/DuUIE/inference.py +++ b/examples/information_extraction/DuUIE/inference.py @@ -1,5 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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 math diff --git a/examples/information_extraction/DuUIE/process_data.py b/examples/information_extraction/DuUIE/process_data.py index d7dcf0bfeae5..f7920ba1a30d 100644 --- a/examples/information_extraction/DuUIE/process_data.py +++ b/examples/information_extraction/DuUIE/process_data.py @@ -1,5 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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 copy from typing import List, Dict from collections import defaultdict diff --git a/examples/information_extraction/DuUIE/run_seq2struct.py b/examples/information_extraction/DuUIE/run_seq2struct.py index e23dab4b9eb7..18c44b751083 100644 --- a/examples/information_extraction/DuUIE/run_seq2struct.py +++ b/examples/information_extraction/DuUIE/run_seq2struct.py @@ -1,5 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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 logging import argparse import math diff --git a/examples/information_extraction/DuUIE/uie/__init__.py b/examples/information_extraction/DuUIE/uie/__init__.py index 5ec233e9790e..b7fa799a6a6e 100644 --- a/examples/information_extraction/DuUIE/uie/__init__.py +++ b/examples/information_extraction/DuUIE/uie/__init__.py @@ -1,5 +1,19 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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. """ Code for Evaluation and Sequence-to-Structure -""" \ No newline at end of file +""" diff --git a/examples/information_extraction/DuUIE/uie/evaluation/__init__.py b/examples/information_extraction/DuUIE/uie/evaluation/__init__.py index b848f3ae83e0..595126a161a7 100644 --- a/examples/information_extraction/DuUIE/uie/evaluation/__init__.py +++ b/examples/information_extraction/DuUIE/uie/evaluation/__init__.py @@ -1,5 +1,19 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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. """ Code for Evaluation -""" \ No newline at end of file +""" diff --git a/examples/information_extraction/DuUIE/uie/evaluation/constants.py b/examples/information_extraction/DuUIE/uie/evaluation/constants.py index 441bcf0a421f..d5f779d46514 100644 --- a/examples/information_extraction/DuUIE/uie/evaluation/constants.py +++ b/examples/information_extraction/DuUIE/uie/evaluation/constants.py @@ -1,6 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- +# Copyright (c) 2022 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 dataclass spot_prompt = '' diff --git a/examples/information_extraction/DuUIE/uie/evaluation/scorer.py b/examples/information_extraction/DuUIE/uie/evaluation/scorer.py index 911a5159ab57..7f8ffa8cd4b8 100644 --- a/examples/information_extraction/DuUIE/uie/evaluation/scorer.py +++ b/examples/information_extraction/DuUIE/uie/evaluation/scorer.py @@ -1,5 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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 collections import defaultdict from copy import deepcopy from typing import Dict, List diff --git a/examples/information_extraction/DuUIE/uie/evaluation/sel2record.py b/examples/information_extraction/DuUIE/uie/evaluation/sel2record.py index fd177cb01d4b..6c1308d0c909 100644 --- a/examples/information_extraction/DuUIE/uie/evaluation/sel2record.py +++ b/examples/information_extraction/DuUIE/uie/evaluation/sel2record.py @@ -1,5 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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 typing import Tuple, List, Dict from collections import defaultdict, OrderedDict, Counter import os diff --git a/examples/information_extraction/DuUIE/uie/seq2struct/__init__.py b/examples/information_extraction/DuUIE/uie/seq2struct/__init__.py index 51a049da803a..bc13950c0b3b 100644 --- a/examples/information_extraction/DuUIE/uie/seq2struct/__init__.py +++ b/examples/information_extraction/DuUIE/uie/seq2struct/__init__.py @@ -1,5 +1,19 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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. """ Code for Sequence-to-Structure """ diff --git a/examples/information_extraction/DuUIE/uie/seq2struct/data_collator.py b/examples/information_extraction/DuUIE/uie/seq2struct/data_collator.py index 35684731d1ae..e6a7d3766ea8 100644 --- a/examples/information_extraction/DuUIE/uie/seq2struct/data_collator.py +++ b/examples/information_extraction/DuUIE/uie/seq2struct/data_collator.py @@ -1,5 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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 dataclass import random import copy diff --git a/examples/information_extraction/DuUIE/uie/seq2struct/t5_bert_tokenizer.py b/examples/information_extraction/DuUIE/uie/seq2struct/t5_bert_tokenizer.py index 4d210c5c29b4..62470a0ef380 100644 --- a/examples/information_extraction/DuUIE/uie/seq2struct/t5_bert_tokenizer.py +++ b/examples/information_extraction/DuUIE/uie/seq2struct/t5_bert_tokenizer.py @@ -1,5 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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 logging from typing import Optional, Union, List diff --git a/examples/information_extraction/DuUIE/uie/seq2struct/utils.py b/examples/information_extraction/DuUIE/uie/seq2struct/utils.py index cb913902e8be..147cad613fec 100644 --- a/examples/information_extraction/DuUIE/uie/seq2struct/utils.py +++ b/examples/information_extraction/DuUIE/uie/seq2struct/utils.py @@ -1,5 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- + +# Copyright (c) 2022 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 typing import List import json import random diff --git a/examples/language_model/elmo/args.py b/examples/language_model/elmo/args.py index 4883e078c013..3b15a9a725e1 100644 --- a/examples/language_model/elmo/args.py +++ b/examples/language_model/elmo/args.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 diff --git a/examples/language_model/elmo/dataset.py b/examples/language_model/elmo/dataset.py index a7ff61fd67ab..aa395b0cb136 100644 --- a/examples/language_model/elmo/dataset.py +++ b/examples/language_model/elmo/dataset.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 glob import random import numpy as np diff --git a/examples/language_model/elmo/elmo.py b/examples/language_model/elmo/elmo.py index cb9844a7d3e3..5555a6671240 100755 --- a/examples/language_model/elmo/elmo.py +++ b/examples/language_model/elmo/elmo.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 numpy as np from typing import List import paddle diff --git a/examples/language_model/elmo/run_eval.py b/examples/language_model/elmo/run_eval.py index 74a2586a4d76..88f67b797f4f 100644 --- a/examples/language_model/elmo/run_eval.py +++ b/examples/language_model/elmo/run_eval.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import math diff --git a/examples/language_model/elmo/run_finetune.py b/examples/language_model/elmo/run_finetune.py index b4f7b506376b..210093e2ba06 100644 --- a/examples/language_model/elmo/run_finetune.py +++ b/examples/language_model/elmo/run_finetune.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 paddle import paddle.nn as nn import paddle.nn.functional as F diff --git a/examples/language_model/elmo/run_pretrain.py b/examples/language_model/elmo/run_pretrain.py index a556dbc1884c..e1fc7fc49416 100644 --- a/examples/language_model/elmo/run_pretrain.py +++ b/examples/language_model/elmo/run_pretrain.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import paddle diff --git a/examples/language_model/elmo/word2vec_base.py b/examples/language_model/elmo/word2vec_base.py index 8b7d45f28f62..fea32e3302b2 100644 --- a/examples/language_model/elmo/word2vec_base.py +++ b/examples/language_model/elmo/word2vec_base.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 paddle import paddle.nn as nn import paddle.nn.functional as F diff --git a/model_zoo/electra/deploy/lite/prepare.py b/model_zoo/electra/deploy/lite/prepare.py index be0c427d2fc7..7ed18d27ac64 100644 --- a/model_zoo/electra/deploy/lite/prepare.py +++ b/model_zoo/electra/deploy/lite/prepare.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import numpy as np diff --git a/model_zoo/electra/deploy/python/predict.py b/model_zoo/electra/deploy/python/predict.py index 2c1cbb5e7d09..84f87e340e41 100755 --- a/model_zoo/electra/deploy/python/predict.py +++ b/model_zoo/electra/deploy/python/predict.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import numpy as np diff --git a/model_zoo/electra/deploy/serving/client.py b/model_zoo/electra/deploy/serving/client.py index 2f269f53bbb4..fb00690a5ef2 100755 --- a/model_zoo/electra/deploy/serving/client.py +++ b/model_zoo/electra/deploy/serving/client.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import numpy as np diff --git a/model_zoo/electra/deploy/serving/covert_inference_model_to_serving.py b/model_zoo/electra/deploy/serving/covert_inference_model_to_serving.py index af6e7b8b96bd..738e8b6551f5 100644 --- a/model_zoo/electra/deploy/serving/covert_inference_model_to_serving.py +++ b/model_zoo/electra/deploy/serving/covert_inference_model_to_serving.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 paddle import paddle_serving_client.io as serving_io diff --git a/model_zoo/ernie-1.0/converter/params_static_to_dygraph.py b/model_zoo/ernie-1.0/converter/params_static_to_dygraph.py index a6888921ec2d..ad82fa7dafc6 100644 --- a/model_zoo/ernie-1.0/converter/params_static_to_dygraph.py +++ b/model_zoo/ernie-1.0/converter/params_static_to_dygraph.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 paddle from paddlenlp.transformers import AutoModelForPretraining diff --git a/model_zoo/ernie-3.0/deploy/triton/models/ernie_seqcls_postprocess/1/model.py b/model_zoo/ernie-3.0/deploy/triton/models/ernie_seqcls_postprocess/1/model.py index dc873659aa9a..0c214194de4c 100644 --- a/model_zoo/ernie-3.0/deploy/triton/models/ernie_seqcls_postprocess/1/model.py +++ b/model_zoo/ernie-3.0/deploy/triton/models/ernie_seqcls_postprocess/1/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 paddle import numpy as np diff --git a/model_zoo/ernie-3.0/deploy/triton/models/ernie_tokencls_postprocess/1/model.py b/model_zoo/ernie-3.0/deploy/triton/models/ernie_tokencls_postprocess/1/model.py index aba51344bf39..518a81f43d56 100644 --- a/model_zoo/ernie-3.0/deploy/triton/models/ernie_tokencls_postprocess/1/model.py +++ b/model_zoo/ernie-3.0/deploy/triton/models/ernie_tokencls_postprocess/1/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 paddle import numpy as np diff --git a/model_zoo/ernie-3.0/deploy/triton/models/ernie_tokenizer/1/model.py b/model_zoo/ernie-3.0/deploy/triton/models/ernie_tokenizer/1/model.py index 9c3d2252301b..460cb22f2106 100644 --- a/model_zoo/ernie-3.0/deploy/triton/models/ernie_tokenizer/1/model.py +++ b/model_zoo/ernie-3.0/deploy/triton/models/ernie_tokenizer/1/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 paddle import numpy as np diff --git a/model_zoo/ernie-3.0/deploy/triton/seq_cls_grpc_client.py b/model_zoo/ernie-3.0/deploy/triton/seq_cls_grpc_client.py index ab0f616062da..1acfb6b9259d 100755 --- a/model_zoo/ernie-3.0/deploy/triton/seq_cls_grpc_client.py +++ b/model_zoo/ernie-3.0/deploy/triton/seq_cls_grpc_client.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 logging import numpy as np import time diff --git a/model_zoo/ernie-3.0/deploy/triton/token_cls_grpc_client.py b/model_zoo/ernie-3.0/deploy/triton/token_cls_grpc_client.py index f9574367235e..c9eedb378592 100755 --- a/model_zoo/ernie-3.0/deploy/triton/token_cls_grpc_client.py +++ b/model_zoo/ernie-3.0/deploy/triton/token_cls_grpc_client.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 ast import logging import numpy as np diff --git a/model_zoo/ernie-health/cblue/model.py b/model_zoo/ernie-health/cblue/model.py index 6da11a463bcf..f8210abaeeb5 100644 --- a/model_zoo/ernie-health/cblue/model.py +++ b/model_zoo/ernie-health/cblue/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 paddle import paddle.nn as nn from paddlenlp.transformers import ElectraPretrainedModel diff --git a/model_zoo/ernie-health/cblue/train_ner.py b/model_zoo/ernie-health/cblue/train_ner.py index 415bbf701c8c..d4d0e675d46a 100644 --- a/model_zoo/ernie-health/cblue/train_ner.py +++ b/model_zoo/ernie-health/cblue/train_ner.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 functools import partial import argparse import os diff --git a/model_zoo/gpt/run_generation.py b/model_zoo/gpt/run_generation.py index b13dfaa4e5e6..f210be0d1ea3 100644 --- a/model_zoo/gpt/run_generation.py +++ b/model_zoo/gpt/run_generation.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 argparse diff --git a/model_zoo/uie/labelstudio2doccano.py b/model_zoo/uie/labelstudio2doccano.py index e081b66490d8..e131c87ef38d 100644 --- a/model_zoo/uie/labelstudio2doccano.py +++ b/model_zoo/uie/labelstudio2doccano.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 os import json diff --git a/paddlenlp/data/iterator.py b/paddlenlp/data/iterator.py index da210a9238ea..ee969734d732 100644 --- a/paddlenlp/data/iterator.py +++ b/paddlenlp/data/iterator.py @@ -1 +1,15 @@ -# Iterator for NLP Dataset +# Copyright (c) 2022 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. + +# Iterator for NLP Dataset diff --git a/paddlenlp/datasets/bq_corpus.py b/paddlenlp/datasets/bq_corpus.py index 587bec8e3892..fdb2a136ac99 100644 --- a/paddlenlp/datasets/bq_corpus.py +++ b/paddlenlp/datasets/bq_corpus.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 collections import json import os diff --git a/paddlenlp/datasets/hf_datasets/__init__.py b/paddlenlp/datasets/hf_datasets/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/datasets/hf_datasets/__init__.py +++ b/paddlenlp/datasets/hf_datasets/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/datasets/hf_datasets/squad_v2.py b/paddlenlp/datasets/hf_datasets/squad_v2.py index d3f97e23341a..3b2508436277 100644 --- a/paddlenlp/datasets/hf_datasets/squad_v2.py +++ b/paddlenlp/datasets/hf_datasets/squad_v2.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. """TODO(squad_v2): Add a description here.""" import json diff --git a/paddlenlp/datasets/wmt14ende.py b/paddlenlp/datasets/wmt14ende.py index 91e5ffdbcbeb..eece5920b946 100644 --- a/paddlenlp/datasets/wmt14ende.py +++ b/paddlenlp/datasets/wmt14ende.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 collections import os import warnings diff --git a/paddlenlp/metrics/chunk.py b/paddlenlp/metrics/chunk.py index 05c0033e2aaa..891ed934e503 100644 --- a/paddlenlp/metrics/chunk.py +++ b/paddlenlp/metrics/chunk.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 collections import defaultdict import numpy as np diff --git a/paddlenlp/metrics/dureader.py b/paddlenlp/metrics/dureader.py index 12bbdfe47739..6a99b8f7de66 100644 --- a/paddlenlp/metrics/dureader.py +++ b/paddlenlp/metrics/dureader.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. """Official evaluation script for SQuAD version 2.0. In addition to basic functionality, we also compute additional statistics and diff --git a/paddlenlp/taskflow/__init__.py b/paddlenlp/taskflow/__init__.py index 318c2306e76b..d39fea274ba7 100644 --- a/paddlenlp/taskflow/__init__.py +++ b/paddlenlp/taskflow/__init__.py @@ -1 +1,15 @@ +# Copyright (c) 2022 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 .taskflow import Taskflow diff --git a/paddlenlp/taskflow/models/__init__.py b/paddlenlp/taskflow/models/__init__.py index d22c2daa4ddb..477da14a26c3 100644 --- a/paddlenlp/taskflow/models/__init__.py +++ b/paddlenlp/taskflow/models/__init__.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 .sentiment_analysis_model import BoWModel, LSTMModel, SkepSequenceModel from .lexical_analysis_model import BiGruCrf from .dependency_parsing_model import BiAffineParser diff --git a/paddlenlp/transformers/albert/__init__.py b/paddlenlp/transformers/albert/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/albert/__init__.py +++ b/paddlenlp/transformers/albert/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/artist/__init__.py b/paddlenlp/transformers/artist/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/artist/__init__.py +++ b/paddlenlp/transformers/artist/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/auto/__init__.py b/paddlenlp/transformers/auto/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/auto/__init__.py +++ b/paddlenlp/transformers/auto/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/bart/__init__.py b/paddlenlp/transformers/bart/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/bart/__init__.py +++ b/paddlenlp/transformers/bart/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/bert/__init__.py b/paddlenlp/transformers/bert/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/bert/__init__.py +++ b/paddlenlp/transformers/bert/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/bert_japanese/__init__.py b/paddlenlp/transformers/bert_japanese/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/bert_japanese/__init__.py +++ b/paddlenlp/transformers/bert_japanese/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/bigbird/__init__.py b/paddlenlp/transformers/bigbird/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/bigbird/__init__.py +++ b/paddlenlp/transformers/bigbird/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/blenderbot/__init__.py b/paddlenlp/transformers/blenderbot/__init__.py index 8b137891791f..97043fd7ba68 100644 --- a/paddlenlp/transformers/blenderbot/__init__.py +++ b/paddlenlp/transformers/blenderbot/__init__.py @@ -1 +1,13 @@ - +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/blenderbot_small/__init__.py b/paddlenlp/transformers/blenderbot_small/__init__.py index 8b137891791f..97043fd7ba68 100644 --- a/paddlenlp/transformers/blenderbot_small/__init__.py +++ b/paddlenlp/transformers/blenderbot_small/__init__.py @@ -1 +1,13 @@ - +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/chinesebert/__init__.py b/paddlenlp/transformers/chinesebert/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/chinesebert/__init__.py +++ b/paddlenlp/transformers/chinesebert/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/clip/__init__.py b/paddlenlp/transformers/clip/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/clip/__init__.py +++ b/paddlenlp/transformers/clip/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/codegen/__init__.py b/paddlenlp/transformers/codegen/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/codegen/__init__.py +++ b/paddlenlp/transformers/codegen/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/convbert/__init__.py b/paddlenlp/transformers/convbert/__init__.py index aa915c710509..3bd752713b17 100644 --- a/paddlenlp/transformers/convbert/__init__.py +++ b/paddlenlp/transformers/convbert/__init__.py @@ -1,2 +1,16 @@ +# Copyright (c) 2022 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 .modeling import * from .tokenizer import * diff --git a/paddlenlp/transformers/ctrl/__init__.py b/paddlenlp/transformers/ctrl/__init__.py index e69de29bb2d1..97043fd7ba68 100755 --- a/paddlenlp/transformers/ctrl/__init__.py +++ b/paddlenlp/transformers/ctrl/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/dallebart/__init__.py b/paddlenlp/transformers/dallebart/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/dallebart/__init__.py +++ b/paddlenlp/transformers/dallebart/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/distilbert/__init__.py b/paddlenlp/transformers/distilbert/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/distilbert/__init__.py +++ b/paddlenlp/transformers/distilbert/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/electra/__init__.py b/paddlenlp/transformers/electra/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/electra/__init__.py +++ b/paddlenlp/transformers/electra/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/ernie/__init__.py b/paddlenlp/transformers/ernie/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/ernie/__init__.py +++ b/paddlenlp/transformers/ernie/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/ernie/static_to_dygraph_params/match_static_to_dygraph.py b/paddlenlp/transformers/ernie/static_to_dygraph_params/match_static_to_dygraph.py index 565474f6af9e..e29b7d0b7b04 100644 --- a/paddlenlp/transformers/ernie/static_to_dygraph_params/match_static_to_dygraph.py +++ b/paddlenlp/transformers/ernie/static_to_dygraph_params/match_static_to_dygraph.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 pickle import paddle diff --git a/paddlenlp/transformers/ernie_ctm/__init__.py b/paddlenlp/transformers/ernie_ctm/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/ernie_ctm/__init__.py +++ b/paddlenlp/transformers/ernie_ctm/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/ernie_doc/__init__.py b/paddlenlp/transformers/ernie_doc/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/ernie_doc/__init__.py +++ b/paddlenlp/transformers/ernie_doc/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/ernie_gen/__init__.py b/paddlenlp/transformers/ernie_gen/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/ernie_gen/__init__.py +++ b/paddlenlp/transformers/ernie_gen/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/ernie_gram/__init__.py b/paddlenlp/transformers/ernie_gram/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/ernie_gram/__init__.py +++ b/paddlenlp/transformers/ernie_gram/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/ernie_gram/matching_param_name.py b/paddlenlp/transformers/ernie_gram/matching_param_name.py index ee08eecea6ec..cf985fc13271 100644 --- a/paddlenlp/transformers/ernie_gram/matching_param_name.py +++ b/paddlenlp/transformers/ernie_gram/matching_param_name.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 pickle import paddle diff --git a/paddlenlp/transformers/ernie_m/__init__.py b/paddlenlp/transformers/ernie_m/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/ernie_m/__init__.py +++ b/paddlenlp/transformers/ernie_m/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/ernie_vil/__init__.py b/paddlenlp/transformers/ernie_vil/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/ernie_vil/__init__.py +++ b/paddlenlp/transformers/ernie_vil/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/fnet/__init__.py b/paddlenlp/transformers/fnet/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/fnet/__init__.py +++ b/paddlenlp/transformers/fnet/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/funnel/__init__.py b/paddlenlp/transformers/funnel/__init__.py index aa915c710509..3bd752713b17 100644 --- a/paddlenlp/transformers/funnel/__init__.py +++ b/paddlenlp/transformers/funnel/__init__.py @@ -1,2 +1,16 @@ +# Copyright (c) 2022 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 .modeling import * from .tokenizer import * diff --git a/paddlenlp/transformers/gau_alpha/__init__.py b/paddlenlp/transformers/gau_alpha/__init__.py index aa915c710509..3bd752713b17 100644 --- a/paddlenlp/transformers/gau_alpha/__init__.py +++ b/paddlenlp/transformers/gau_alpha/__init__.py @@ -1,2 +1,16 @@ +# Copyright (c) 2022 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 .modeling import * from .tokenizer import * diff --git a/paddlenlp/transformers/gpt/__init__.py b/paddlenlp/transformers/gpt/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/gpt/__init__.py +++ b/paddlenlp/transformers/gpt/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/gptj/__init__.py b/paddlenlp/transformers/gptj/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/gptj/__init__.py +++ b/paddlenlp/transformers/gptj/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/guided_diffusion_utils/__init__.py b/paddlenlp/transformers/guided_diffusion_utils/__init__.py index 46c4d89f4cd9..3204be20adf1 100644 --- a/paddlenlp/transformers/guided_diffusion_utils/__init__.py +++ b/paddlenlp/transformers/guided_diffusion_utils/__init__.py @@ -1,2 +1,16 @@ +# Copyright (c) 2022 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 .model_diffusion import create_gaussian_diffusion, create_unet_model, create_secondary_model -from .utils import DiscoDiffusionMixin \ No newline at end of file +from .utils import DiscoDiffusionMixin diff --git a/paddlenlp/transformers/guided_diffusion_utils/gaussian_diffusion.py b/paddlenlp/transformers/guided_diffusion_utils/gaussian_diffusion.py index 7736c42a6cef..2f2813dd543b 100755 --- a/paddlenlp/transformers/guided_diffusion_utils/gaussian_diffusion.py +++ b/paddlenlp/transformers/guided_diffusion_utils/gaussian_diffusion.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. """ Diffusion model implemented by Paddle. This code is rewritten based on Pytorch version of of Ho et al's diffusion models: diff --git a/paddlenlp/transformers/guided_diffusion_utils/losses.py b/paddlenlp/transformers/guided_diffusion_utils/losses.py index a43a53f2fca9..996a22e00fd3 100755 --- a/paddlenlp/transformers/guided_diffusion_utils/losses.py +++ b/paddlenlp/transformers/guided_diffusion_utils/losses.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. """ Helpers for various likelihood-based losses implemented by Paddle. These are ported from the original Ho et al. diffusion models codebase: diff --git a/paddlenlp/transformers/guided_diffusion_utils/make_cutouts.py b/paddlenlp/transformers/guided_diffusion_utils/make_cutouts.py index 9d9831993923..f75f23141b50 100755 --- a/paddlenlp/transformers/guided_diffusion_utils/make_cutouts.py +++ b/paddlenlp/transformers/guided_diffusion_utils/make_cutouts.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. ''' This code is rewritten by Paddle based on Jina-ai/discoart. https://github.com/jina-ai/discoart/blob/main/discoart/nn/make_cutouts.py diff --git a/paddlenlp/transformers/guided_diffusion_utils/model_diffusion.py b/paddlenlp/transformers/guided_diffusion_utils/model_diffusion.py index c9ae17bcb9f7..1584dec6f006 100644 --- a/paddlenlp/transformers/guided_diffusion_utils/model_diffusion.py +++ b/paddlenlp/transformers/guided_diffusion_utils/model_diffusion.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. ''' This code is based on https://github.com/openai/guided-diffusion/blob/main/guided_diffusion/script_util.py diff --git a/paddlenlp/transformers/guided_diffusion_utils/perlin_noises.py b/paddlenlp/transformers/guided_diffusion_utils/perlin_noises.py index fe1688974de8..c58f3449c184 100755 --- a/paddlenlp/transformers/guided_diffusion_utils/perlin_noises.py +++ b/paddlenlp/transformers/guided_diffusion_utils/perlin_noises.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. ''' Perlin noise implementation by Paddle. This code is rewritten based on: diff --git a/paddlenlp/transformers/guided_diffusion_utils/resize_right.py b/paddlenlp/transformers/guided_diffusion_utils/resize_right.py index a65ed0b9116d..63c3587e3f71 100755 --- a/paddlenlp/transformers/guided_diffusion_utils/resize_right.py +++ b/paddlenlp/transformers/guided_diffusion_utils/resize_right.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 fractions import Fraction from math import ceil diff --git a/paddlenlp/transformers/guided_diffusion_utils/sec_diff.py b/paddlenlp/transformers/guided_diffusion_utils/sec_diff.py index 84875cc1779d..d2023ae5c89e 100644 --- a/paddlenlp/transformers/guided_diffusion_utils/sec_diff.py +++ b/paddlenlp/transformers/guided_diffusion_utils/sec_diff.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. ''' This code is rewritten by Paddle based on https://github.com/jina-ai/discoart/blob/main/discoart/nn/sec_diff.py diff --git a/paddlenlp/transformers/guided_diffusion_utils/transforms.py b/paddlenlp/transformers/guided_diffusion_utils/transforms.py index 022be4688a92..dec6234be09f 100755 --- a/paddlenlp/transformers/guided_diffusion_utils/transforms.py +++ b/paddlenlp/transformers/guided_diffusion_utils/transforms.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. ''' This code is rewritten by Paddle based on https://github.com/pytorch/vision/blob/main/torchvision/transforms/transforms.py diff --git a/paddlenlp/transformers/guided_diffusion_utils/unet.py b/paddlenlp/transformers/guided_diffusion_utils/unet.py index 67f8697830a5..44c9b96d31a6 100755 --- a/paddlenlp/transformers/guided_diffusion_utils/unet.py +++ b/paddlenlp/transformers/guided_diffusion_utils/unet.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. ''' This code is rewritten by Paddle based on https://github.com/openai/guided-diffusion/blob/main/guided_diffusion/unet.py diff --git a/paddlenlp/transformers/layoutlm/__init__.py b/paddlenlp/transformers/layoutlm/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/layoutlm/__init__.py +++ b/paddlenlp/transformers/layoutlm/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/layoutlmv2/__init__.py b/paddlenlp/transformers/layoutlmv2/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/layoutlmv2/__init__.py +++ b/paddlenlp/transformers/layoutlmv2/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/layoutxlm/__init__.py b/paddlenlp/transformers/layoutxlm/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/layoutxlm/__init__.py +++ b/paddlenlp/transformers/layoutxlm/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/luke/__init__.py b/paddlenlp/transformers/luke/__init__.py index aa915c710509..3bd752713b17 100644 --- a/paddlenlp/transformers/luke/__init__.py +++ b/paddlenlp/transformers/luke/__init__.py @@ -1,2 +1,16 @@ +# Copyright (c) 2022 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 .modeling import * from .tokenizer import * diff --git a/paddlenlp/transformers/mbart/__init__.py b/paddlenlp/transformers/mbart/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/mbart/__init__.py +++ b/paddlenlp/transformers/mbart/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/megatronbert/__init__.py b/paddlenlp/transformers/megatronbert/__init__.py index 8b137891791f..97043fd7ba68 100644 --- a/paddlenlp/transformers/megatronbert/__init__.py +++ b/paddlenlp/transformers/megatronbert/__init__.py @@ -1 +1,13 @@ - +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/mobilebert/__init__.py b/paddlenlp/transformers/mobilebert/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/mobilebert/__init__.py +++ b/paddlenlp/transformers/mobilebert/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/mpnet/__init__.py b/paddlenlp/transformers/mpnet/__init__.py index aa915c710509..3bd752713b17 100644 --- a/paddlenlp/transformers/mpnet/__init__.py +++ b/paddlenlp/transformers/mpnet/__init__.py @@ -1,2 +1,16 @@ +# Copyright (c) 2022 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 .modeling import * from .tokenizer import * diff --git a/paddlenlp/transformers/nezha/__init__.py b/paddlenlp/transformers/nezha/__init__.py index f72961c755fe..3bd752713b17 100644 --- a/paddlenlp/transformers/nezha/__init__.py +++ b/paddlenlp/transformers/nezha/__init__.py @@ -1,2 +1,16 @@ -from .modeling import * -from .tokenizer import * +# Copyright (c) 2022 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 .modeling import * +from .tokenizer import * diff --git a/paddlenlp/transformers/opt/__init__.py b/paddlenlp/transformers/opt/__init__.py index 613a46b95cfb..9c9c883a4297 100644 --- a/paddlenlp/transformers/opt/__init__.py +++ b/paddlenlp/transformers/opt/__init__.py @@ -1 +1,15 @@ -from .modeling import * +# Copyright (c) 2022 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 .modeling import * diff --git a/paddlenlp/transformers/ppminilm/__init__.py b/paddlenlp/transformers/ppminilm/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/ppminilm/__init__.py +++ b/paddlenlp/transformers/ppminilm/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/prophetnet/__init__.py b/paddlenlp/transformers/prophetnet/__init__.py index aa915c710509..3bd752713b17 100644 --- a/paddlenlp/transformers/prophetnet/__init__.py +++ b/paddlenlp/transformers/prophetnet/__init__.py @@ -1,2 +1,16 @@ +# Copyright (c) 2022 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 .modeling import * from .tokenizer import * diff --git a/paddlenlp/transformers/reformer/__init__.py b/paddlenlp/transformers/reformer/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/reformer/__init__.py +++ b/paddlenlp/transformers/reformer/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/rembert/__init__.py b/paddlenlp/transformers/rembert/__init__.py index 8b137891791f..97043fd7ba68 100644 --- a/paddlenlp/transformers/rembert/__init__.py +++ b/paddlenlp/transformers/rembert/__init__.py @@ -1 +1,13 @@ - +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/roberta/__init__.py b/paddlenlp/transformers/roberta/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/roberta/__init__.py +++ b/paddlenlp/transformers/roberta/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/roformer/__init__.py b/paddlenlp/transformers/roformer/__init__.py index aa915c710509..3bd752713b17 100644 --- a/paddlenlp/transformers/roformer/__init__.py +++ b/paddlenlp/transformers/roformer/__init__.py @@ -1,2 +1,16 @@ +# Copyright (c) 2022 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 .modeling import * from .tokenizer import * diff --git a/paddlenlp/transformers/roformerv2/__init__.py b/paddlenlp/transformers/roformerv2/__init__.py index aa915c710509..3bd752713b17 100644 --- a/paddlenlp/transformers/roformerv2/__init__.py +++ b/paddlenlp/transformers/roformerv2/__init__.py @@ -1,2 +1,16 @@ +# Copyright (c) 2022 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 .modeling import * from .tokenizer import * diff --git a/paddlenlp/transformers/semantic_search/__init__.py b/paddlenlp/transformers/semantic_search/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/semantic_search/__init__.py +++ b/paddlenlp/transformers/semantic_search/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/skep/__init__.py b/paddlenlp/transformers/skep/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/skep/__init__.py +++ b/paddlenlp/transformers/skep/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/squeezebert/__init__.py b/paddlenlp/transformers/squeezebert/__init__.py index e69de29bb2d1..97043fd7ba68 100755 --- a/paddlenlp/transformers/squeezebert/__init__.py +++ b/paddlenlp/transformers/squeezebert/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/stable_diffusion_utils/__init__.py b/paddlenlp/transformers/stable_diffusion_utils/__init__.py index e03311d4453f..c8ad1d1b664e 100644 --- a/paddlenlp/transformers/stable_diffusion_utils/__init__.py +++ b/paddlenlp/transformers/stable_diffusion_utils/__init__.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 .unet_2d_condition import UNet2DConditionModel from .vae import AutoencoderKL from .schedulers import (LMSDiscreteScheduler, PNDMScheduler, DDIMScheduler, diff --git a/paddlenlp/transformers/t5/__init__.py b/paddlenlp/transformers/t5/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/t5/__init__.py +++ b/paddlenlp/transformers/t5/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/tinybert/__init__.py b/paddlenlp/transformers/tinybert/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/tinybert/__init__.py +++ b/paddlenlp/transformers/tinybert/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/transformer/__init__.py b/paddlenlp/transformers/transformer/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/transformer/__init__.py +++ b/paddlenlp/transformers/transformer/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/transformer/modeling.py b/paddlenlp/transformers/transformer/modeling.py index 03055ccdc9d4..d87564b6e893 100644 --- a/paddlenlp/transformers/transformer/modeling.py +++ b/paddlenlp/transformers/transformer/modeling.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 numpy as np import paddle diff --git a/paddlenlp/transformers/unified_transformer/__init__.py b/paddlenlp/transformers/unified_transformer/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/unified_transformer/__init__.py +++ b/paddlenlp/transformers/unified_transformer/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/unimo/__init__.py b/paddlenlp/transformers/unimo/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/unimo/__init__.py +++ b/paddlenlp/transformers/unimo/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/xlm/__init__.py b/paddlenlp/transformers/xlm/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/paddlenlp/transformers/xlm/__init__.py +++ b/paddlenlp/transformers/xlm/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/paddlenlp/transformers/xlnet/__init__.py b/paddlenlp/transformers/xlnet/__init__.py index cba66ffccebd..f8163184797e 100644 --- a/paddlenlp/transformers/xlnet/__init__.py +++ b/paddlenlp/transformers/xlnet/__init__.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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 fc079c25d06fab621310c9aa9742bbb9638decb7 Mon Sep 17 00:00:00 2001 From: Zhong Hui Date: Wed, 14 Sep 2022 10:51:49 +0800 Subject: [PATCH 2/2] add other folder --- applications/doc_vqa/Extraction/change_to_mrc.py | 14 ++++++++++++++ applications/doc_vqa/Extraction/docvqa.py | 14 ++++++++++++++ applications/doc_vqa/Extraction/model.py | 14 ++++++++++++++ applications/doc_vqa/Extraction/run_docvqa.py | 14 ++++++++++++++ applications/doc_vqa/Extraction/view.py | 14 ++++++++++++++ applications/doc_vqa/OCR_process/ocr_process.py | 14 ++++++++++++++ applications/doc_vqa/Rerank/change_to_rerank.py | 14 ++++++++++++++ applications/doc_vqa/Rerank/src/index_search.py | 14 ++++++++++++++ applications/doc_vqa/Rerank/src/merge.py | 14 ++++++++++++++ .../recall/in_batch_negative/inference.py | 14 ++++++++++++++ .../neural_search/recall/simcse/inference.py | 14 ++++++++++++++ .../neural_search/search_system/run_system.py | 14 ++++++++++++++ .../question_answering/faq_finance/run_system.py | 14 ++++++++++++++ .../question_answering/faq_system/run_system.py | 14 ++++++++++++++ applications/speech_cmd_analysis/pipeline.py | 14 ++++++++++++++ .../models/seqcls_postprocess/1/model.py | 14 ++++++++++++++ .../triton_serving/models/tokenizer/1/model.py | 14 ++++++++++++++ .../deploy/triton_serving/seqcls_grpc_client.py | 14 ++++++++++++++ .../hierarchical/retrieval_based/run_system.py | 14 ++++++++++++++ .../hierarchical/retrieval_based/utils/__init__.py | 13 +++++++++++++ .../models/seqcls_postprocess/1/model.py | 14 ++++++++++++++ .../triton_serving/models/tokenizer/1/model.py | 14 ++++++++++++++ .../deploy/triton_serving/seqcls_grpc_client.py | 14 ++++++++++++++ .../multi_class/retrieval_based/run_system.py | 14 ++++++++++++++ .../multi_class/retrieval_based/utils/__init__.py | 13 +++++++++++++ .../models/seqcls_postprocess/1/model.py | 14 ++++++++++++++ .../triton_serving/models/tokenizer/1/model.py | 14 ++++++++++++++ .../deploy/triton_serving/seqcls_grpc_client.py | 14 ++++++++++++++ applications/text_summarization/train.py | 14 ++++++++++++++ applications/text_summarization/utils.py | 14 ++++++++++++++ .../frequently-asked-question/dense_faq_example.py | 14 ++++++++++++++ .../question-answering/dense_qa_example.py | 14 ++++++++++++++ .../semantic-search/semantic_search_example.py | 14 ++++++++++++++ pipelines/pipelines/data_handler/__init__.py | 13 +++++++++++++ pipelines/pipelines/utils/__init__.py | 14 ++++++++++++++ pipelines/pipelines/utils/cleaning.py | 14 ++++++++++++++ pipelines/pipelines/utils/common_utils.py | 14 ++++++++++++++ pipelines/pipelines/utils/doc_store.py | 14 ++++++++++++++ pipelines/pipelines/utils/export_utils.py | 14 ++++++++++++++ pipelines/pipelines/utils/import_utils.py | 14 ++++++++++++++ pipelines/pipelines/utils/logger.py | 14 ++++++++++++++ pipelines/pipelines/utils/preprocessing.py | 14 ++++++++++++++ pipelines/rest_api/__init__.py | 13 +++++++++++++ pipelines/rest_api/controller/__init__.py | 14 ++++++++++++++ pipelines/rest_api/controller/errors/__init__.py | 13 +++++++++++++ pipelines/rest_api/controller/errors/http_error.py | 14 ++++++++++++++ pipelines/rest_api/pipeline/__init__.py | 13 +++++++++++++ pipelines/rest_api/pipeline/custom_component.py | 13 +++++++++++++ pipelines/rest_api/test/__init__.py | 13 +++++++++++++ pipelines/rest_api/test/test_rest_api.py | 14 ++++++++++++++ pipelines/ui/__init__.py | 13 +++++++++++++ pipelines/utils/offline_ann.py | 14 ++++++++++++++ 52 files changed, 719 insertions(+) diff --git a/applications/doc_vqa/Extraction/change_to_mrc.py b/applications/doc_vqa/Extraction/change_to_mrc.py index e01b72bea32f..bb388b166055 100644 --- a/applications/doc_vqa/Extraction/change_to_mrc.py +++ b/applications/doc_vqa/Extraction/change_to_mrc.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 sys import json import numpy as np diff --git a/applications/doc_vqa/Extraction/docvqa.py b/applications/doc_vqa/Extraction/docvqa.py index e0ae98d3b7ed..53a32dd8f31b 100755 --- a/applications/doc_vqa/Extraction/docvqa.py +++ b/applications/doc_vqa/Extraction/docvqa.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 cv2 import sys diff --git a/applications/doc_vqa/Extraction/model.py b/applications/doc_vqa/Extraction/model.py index 9e5c4ce69e1a..6e9205ca6fc2 100644 --- a/applications/doc_vqa/Extraction/model.py +++ b/applications/doc_vqa/Extraction/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 numpy as np import paddle diff --git a/applications/doc_vqa/Extraction/run_docvqa.py b/applications/doc_vqa/Extraction/run_docvqa.py index a9ae23184fe2..4861eacc457a 100755 --- a/applications/doc_vqa/Extraction/run_docvqa.py +++ b/applications/doc_vqa/Extraction/run_docvqa.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 sys import copy diff --git a/applications/doc_vqa/Extraction/view.py b/applications/doc_vqa/Extraction/view.py index 5f668d5f728e..8c9906b797a0 100755 --- a/applications/doc_vqa/Extraction/view.py +++ b/applications/doc_vqa/Extraction/view.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 cv2 import json import numpy as np diff --git a/applications/doc_vqa/OCR_process/ocr_process.py b/applications/doc_vqa/OCR_process/ocr_process.py index 8a1343f22639..233e7b6b829f 100755 --- a/applications/doc_vqa/OCR_process/ocr_process.py +++ b/applications/doc_vqa/OCR_process/ocr_process.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 json from paddleocr import PaddleOCR diff --git a/applications/doc_vqa/Rerank/change_to_rerank.py b/applications/doc_vqa/Rerank/change_to_rerank.py index 7a8f3d39a125..743efd5e9a22 100644 --- a/applications/doc_vqa/Rerank/change_to_rerank.py +++ b/applications/doc_vqa/Rerank/change_to_rerank.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 sys import json diff --git a/applications/doc_vqa/Rerank/src/index_search.py b/applications/doc_vqa/Rerank/src/index_search.py index a25e97a2a9ab..c9e12ce710ea 100755 --- a/applications/doc_vqa/Rerank/src/index_search.py +++ b/applications/doc_vqa/Rerank/src/index_search.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 sys import time import faiss diff --git a/applications/doc_vqa/Rerank/src/merge.py b/applications/doc_vqa/Rerank/src/merge.py index 049a4ac882d0..f4133721e076 100755 --- a/applications/doc_vqa/Rerank/src/merge.py +++ b/applications/doc_vqa/Rerank/src/merge.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 sys shift = int(sys.argv[1]) diff --git a/applications/neural_search/recall/in_batch_negative/inference.py b/applications/neural_search/recall/in_batch_negative/inference.py index 21bc39b3affa..09574b00ce2e 100644 --- a/applications/neural_search/recall/in_batch_negative/inference.py +++ b/applications/neural_search/recall/in_batch_negative/inference.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 functools import partial import argparse import os diff --git a/applications/neural_search/recall/simcse/inference.py b/applications/neural_search/recall/simcse/inference.py index 097c348c736f..edcbc53487a2 100644 --- a/applications/neural_search/recall/simcse/inference.py +++ b/applications/neural_search/recall/simcse/inference.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 functools import partial import argparse import os diff --git a/applications/neural_search/search_system/run_system.py b/applications/neural_search/search_system/run_system.py index fd60183581ff..7f0e3328f843 100644 --- a/applications/neural_search/search_system/run_system.py +++ b/applications/neural_search/search_system/run_system.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 functools import partial import argparse import os diff --git a/applications/question_answering/faq_finance/run_system.py b/applications/question_answering/faq_finance/run_system.py index 69defdfed74f..1717bf5ecd88 100644 --- a/applications/question_answering/faq_finance/run_system.py +++ b/applications/question_answering/faq_finance/run_system.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 functools import partial import argparse import os diff --git a/applications/question_answering/faq_system/run_system.py b/applications/question_answering/faq_system/run_system.py index 3fff6f3f2b49..e08c38032193 100644 --- a/applications/question_answering/faq_system/run_system.py +++ b/applications/question_answering/faq_system/run_system.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 functools import partial import argparse import os diff --git a/applications/speech_cmd_analysis/pipeline.py b/applications/speech_cmd_analysis/pipeline.py index 692e52295edc..b728354c3adf 100644 --- a/applications/speech_cmd_analysis/pipeline.py +++ b/applications/speech_cmd_analysis/pipeline.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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. + # ## Task: Speech Command Analysis for Audio Expense Claim # # Structured information entry is a common application scenario of speech diff --git a/applications/text_classification/hierarchical/deploy/triton_serving/models/seqcls_postprocess/1/model.py b/applications/text_classification/hierarchical/deploy/triton_serving/models/seqcls_postprocess/1/model.py index ebf4d0acea06..bba3ee8d9ba3 100644 --- a/applications/text_classification/hierarchical/deploy/triton_serving/models/seqcls_postprocess/1/model.py +++ b/applications/text_classification/hierarchical/deploy/triton_serving/models/seqcls_postprocess/1/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time diff --git a/applications/text_classification/hierarchical/deploy/triton_serving/models/tokenizer/1/model.py b/applications/text_classification/hierarchical/deploy/triton_serving/models/tokenizer/1/model.py index 2ec5d430f270..a6bbc5be3ac4 100644 --- a/applications/text_classification/hierarchical/deploy/triton_serving/models/tokenizer/1/model.py +++ b/applications/text_classification/hierarchical/deploy/triton_serving/models/tokenizer/1/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time diff --git a/applications/text_classification/hierarchical/deploy/triton_serving/seqcls_grpc_client.py b/applications/text_classification/hierarchical/deploy/triton_serving/seqcls_grpc_client.py index f8680c62ce14..d04df64f4939 100755 --- a/applications/text_classification/hierarchical/deploy/triton_serving/seqcls_grpc_client.py +++ b/applications/text_classification/hierarchical/deploy/triton_serving/seqcls_grpc_client.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 struct import logging diff --git a/applications/text_classification/hierarchical/retrieval_based/run_system.py b/applications/text_classification/hierarchical/retrieval_based/run_system.py index ad63f97529c4..3891d36da2e7 100644 --- a/applications/text_classification/hierarchical/retrieval_based/run_system.py +++ b/applications/text_classification/hierarchical/retrieval_based/run_system.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 functools import partial import argparse import os diff --git a/applications/text_classification/hierarchical/retrieval_based/utils/__init__.py b/applications/text_classification/hierarchical/retrieval_based/utils/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/applications/text_classification/hierarchical/retrieval_based/utils/__init__.py +++ b/applications/text_classification/hierarchical/retrieval_based/utils/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/applications/text_classification/multi_class/deploy/triton_serving/models/seqcls_postprocess/1/model.py b/applications/text_classification/multi_class/deploy/triton_serving/models/seqcls_postprocess/1/model.py index ced142ed8a3e..183c9c0190a6 100644 --- a/applications/text_classification/multi_class/deploy/triton_serving/models/seqcls_postprocess/1/model.py +++ b/applications/text_classification/multi_class/deploy/triton_serving/models/seqcls_postprocess/1/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time diff --git a/applications/text_classification/multi_class/deploy/triton_serving/models/tokenizer/1/model.py b/applications/text_classification/multi_class/deploy/triton_serving/models/tokenizer/1/model.py index fde3f3643146..d6dcd057bb0d 100644 --- a/applications/text_classification/multi_class/deploy/triton_serving/models/tokenizer/1/model.py +++ b/applications/text_classification/multi_class/deploy/triton_serving/models/tokenizer/1/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time diff --git a/applications/text_classification/multi_class/deploy/triton_serving/seqcls_grpc_client.py b/applications/text_classification/multi_class/deploy/triton_serving/seqcls_grpc_client.py index 1f96dbd170f1..5534cc231d78 100755 --- a/applications/text_classification/multi_class/deploy/triton_serving/seqcls_grpc_client.py +++ b/applications/text_classification/multi_class/deploy/triton_serving/seqcls_grpc_client.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 struct import logging diff --git a/applications/text_classification/multi_class/retrieval_based/run_system.py b/applications/text_classification/multi_class/retrieval_based/run_system.py index c8b003dd1357..f9ec6deb022c 100644 --- a/applications/text_classification/multi_class/retrieval_based/run_system.py +++ b/applications/text_classification/multi_class/retrieval_based/run_system.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 functools import partial import argparse import os diff --git a/applications/text_classification/multi_class/retrieval_based/utils/__init__.py b/applications/text_classification/multi_class/retrieval_based/utils/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/applications/text_classification/multi_class/retrieval_based/utils/__init__.py +++ b/applications/text_classification/multi_class/retrieval_based/utils/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/applications/text_classification/multi_label/deploy/triton_serving/models/seqcls_postprocess/1/model.py b/applications/text_classification/multi_label/deploy/triton_serving/models/seqcls_postprocess/1/model.py index ebf4d0acea06..bba3ee8d9ba3 100644 --- a/applications/text_classification/multi_label/deploy/triton_serving/models/seqcls_postprocess/1/model.py +++ b/applications/text_classification/multi_label/deploy/triton_serving/models/seqcls_postprocess/1/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time diff --git a/applications/text_classification/multi_label/deploy/triton_serving/models/tokenizer/1/model.py b/applications/text_classification/multi_label/deploy/triton_serving/models/tokenizer/1/model.py index fde3f3643146..d6dcd057bb0d 100644 --- a/applications/text_classification/multi_label/deploy/triton_serving/models/tokenizer/1/model.py +++ b/applications/text_classification/multi_label/deploy/triton_serving/models/tokenizer/1/model.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time diff --git a/applications/text_classification/multi_label/deploy/triton_serving/seqcls_grpc_client.py b/applications/text_classification/multi_label/deploy/triton_serving/seqcls_grpc_client.py index 4fd4d2e2aaaa..ad257b1fb51c 100755 --- a/applications/text_classification/multi_label/deploy/triton_serving/seqcls_grpc_client.py +++ b/applications/text_classification/multi_label/deploy/triton_serving/seqcls_grpc_client.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 struct import logging diff --git a/applications/text_summarization/train.py b/applications/text_summarization/train.py index d93dd83f9ec5..eba5432f3c93 100644 --- a/applications/text_summarization/train.py +++ b/applications/text_summarization/train.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import math diff --git a/applications/text_summarization/utils.py b/applications/text_summarization/utils.py index c4c43892caed..371e33197fb8 100644 --- a/applications/text_summarization/utils.py +++ b/applications/text_summarization/utils.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 from functools import partial diff --git a/pipelines/examples/frequently-asked-question/dense_faq_example.py b/pipelines/examples/frequently-asked-question/dense_faq_example.py index e73e5c3a0dbb..7723287c1fa2 100644 --- a/pipelines/examples/frequently-asked-question/dense_faq_example.py +++ b/pipelines/examples/frequently-asked-question/dense_faq_example.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 logging diff --git a/pipelines/examples/question-answering/dense_qa_example.py b/pipelines/examples/question-answering/dense_qa_example.py index f1771a87045c..2ab2287c2914 100644 --- a/pipelines/examples/question-answering/dense_qa_example.py +++ b/pipelines/examples/question-answering/dense_qa_example.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 logging diff --git a/pipelines/examples/semantic-search/semantic_search_example.py b/pipelines/examples/semantic-search/semantic_search_example.py index b21b24b7631c..a657d3d6df1e 100644 --- a/pipelines/examples/semantic-search/semantic_search_example.py +++ b/pipelines/examples/semantic-search/semantic_search_example.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 argparse diff --git a/pipelines/pipelines/data_handler/__init__.py b/pipelines/pipelines/data_handler/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/pipelines/pipelines/data_handler/__init__.py +++ b/pipelines/pipelines/data_handler/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/pipelines/pipelines/utils/__init__.py b/pipelines/pipelines/utils/__init__.py index 1172391364cc..32ddc1f50f41 100644 --- a/pipelines/pipelines/utils/__init__.py +++ b/pipelines/pipelines/utils/__init__.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 pipelines.utils.preprocessing import convert_files_to_dicts, tika_convert_files_to_dicts from pipelines.utils.import_utils import fetch_archive_from_http from pipelines.utils.cleaning import clean_wiki_text diff --git a/pipelines/pipelines/utils/cleaning.py b/pipelines/pipelines/utils/cleaning.py index 460df47c0ac0..51811c42ed39 100644 --- a/pipelines/pipelines/utils/cleaning.py +++ b/pipelines/pipelines/utils/cleaning.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 re diff --git a/pipelines/pipelines/utils/common_utils.py b/pipelines/pipelines/utils/common_utils.py index 551aedca9ae4..6b043d679cbe 100644 --- a/pipelines/pipelines/utils/common_utils.py +++ b/pipelines/pipelines/utils/common_utils.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 typing import Any, Iterator, Tuple, List import logging diff --git a/pipelines/pipelines/utils/doc_store.py b/pipelines/pipelines/utils/doc_store.py index 712ab7e339d8..93301359c23d 100644 --- a/pipelines/pipelines/utils/doc_store.py +++ b/pipelines/pipelines/utils/doc_store.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 time import logging import subprocess diff --git a/pipelines/pipelines/utils/export_utils.py b/pipelines/pipelines/utils/export_utils.py index d835b1fbdc05..4b3c63ea8e00 100644 --- a/pipelines/pipelines/utils/export_utils.py +++ b/pipelines/pipelines/utils/export_utils.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 typing import Dict, Any, List, Optional import json diff --git a/pipelines/pipelines/utils/import_utils.py b/pipelines/pipelines/utils/import_utils.py index 26440bb8b74c..85f3d25eeea6 100644 --- a/pipelines/pipelines/utils/import_utils.py +++ b/pipelines/pipelines/utils/import_utils.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 typing import Optional import io diff --git a/pipelines/pipelines/utils/logger.py b/pipelines/pipelines/utils/logger.py index 64b0c0f99a7f..da1f7139ffd1 100644 --- a/pipelines/pipelines/utils/logger.py +++ b/pipelines/pipelines/utils/logger.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 logging # import from requests.exceptions import ConnectionError diff --git a/pipelines/pipelines/utils/preprocessing.py b/pipelines/pipelines/utils/preprocessing.py index f78962a0d102..29c3bb290427 100644 --- a/pipelines/pipelines/utils/preprocessing.py +++ b/pipelines/pipelines/utils/preprocessing.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 typing import Callable, Dict, List, Optional import re diff --git a/pipelines/rest_api/__init__.py b/pipelines/rest_api/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/pipelines/rest_api/__init__.py +++ b/pipelines/rest_api/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/pipelines/rest_api/controller/__init__.py b/pipelines/rest_api/controller/__init__.py index 4b066366a9e2..10c635ea7fa3 100644 --- a/pipelines/rest_api/controller/__init__.py +++ b/pipelines/rest_api/controller/__init__.py @@ -1 +1,15 @@ +# Copyright (c) 2022 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 rest_api.pipeline import custom_component # this import is required for the Custom Components to be registered diff --git a/pipelines/rest_api/controller/errors/__init__.py b/pipelines/rest_api/controller/errors/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/pipelines/rest_api/controller/errors/__init__.py +++ b/pipelines/rest_api/controller/errors/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/pipelines/rest_api/controller/errors/http_error.py b/pipelines/rest_api/controller/errors/http_error.py index c5032293589b..1c0fc56714d1 100644 --- a/pipelines/rest_api/controller/errors/http_error.py +++ b/pipelines/rest_api/controller/errors/http_error.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 fastapi import HTTPException from starlette.requests import Request from starlette.responses import JSONResponse diff --git a/pipelines/rest_api/pipeline/__init__.py b/pipelines/rest_api/pipeline/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/pipelines/rest_api/pipeline/__init__.py +++ b/pipelines/rest_api/pipeline/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/pipelines/rest_api/pipeline/custom_component.py b/pipelines/rest_api/pipeline/custom_component.py index 88b7f8527ccb..efc84736e1ef 100644 --- a/pipelines/rest_api/pipeline/custom_component.py +++ b/pipelines/rest_api/pipeline/custom_component.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 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. """ Pipelines allow putting together Components to build a graph. diff --git a/pipelines/rest_api/test/__init__.py b/pipelines/rest_api/test/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/pipelines/rest_api/test/__init__.py +++ b/pipelines/rest_api/test/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/pipelines/rest_api/test/test_rest_api.py b/pipelines/rest_api/test/test_rest_api.py index 158e72cfd8fa..432ef68d8574 100644 --- a/pipelines/rest_api/test/test_rest_api.py +++ b/pipelines/rest_api/test/test_rest_api.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 from copy import deepcopy from pathlib import Path diff --git a/pipelines/ui/__init__.py b/pipelines/ui/__init__.py index e69de29bb2d1..97043fd7ba68 100644 --- a/pipelines/ui/__init__.py +++ b/pipelines/ui/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2022 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. diff --git a/pipelines/utils/offline_ann.py b/pipelines/utils/offline_ann.py index b2106cb3b443..3a2ac9756dcb 100644 --- a/pipelines/utils/offline_ann.py +++ b/pipelines/utils/offline_ann.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 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 os