Skip to content

Commit f089a18

Browse files
authored
add more detail for code source. (#1947)
1 parent 99804a2 commit f089a18

File tree

6 files changed

+39
-0
lines changed

6 files changed

+39
-0
lines changed

paddlenlp/trainer/argparser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
# Notice, most of this file is modified from
17+
# https://github.com/huggingface/transformers/blob/main/src/transformers/hf_argparser.py
18+
# Thanks a lot.
19+
1620
import dataclasses
1721
import json
1822
import sys

paddlenlp/trainer/trainer_args.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
# Notice, most of this file is modified from
17+
# https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py
18+
# Thanks a lot.
19+
1620
import contextlib
1721
import json
1822
import math

paddlenlp/trainer/trainer_base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
# Notice, most of this file is modified from
17+
# https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py
18+
# Thanks a lot.
19+
1620
import collections
1721
import contextlib
1822
import inspect

paddlenlp/trainer/trainer_callback.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15+
16+
# Notice, most of this file is modified from
17+
# https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_callback.py
18+
# Thanks a lot.
1519
"""
1620
Callbacks to use with the Trainer class and customize the training loop.
1721
"""

paddlenlp/trainer/trainer_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15+
16+
# Notice, most of this file is modified from
17+
# https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_utils.py
18+
# Thanks a lot.
1519
"""
1620
Utilities for the Trainer class.
1721
"""

paddlenlp/trainer/utils/helper.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# Copyright 2020-present the HuggingFace Inc. team.
2+
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# Notice, most of this file is modified from
17+
# https://github.com/huggingface/transformers/blob/main/src/transformers
18+
# Thanks a lot.
19+
120
import paddle
221
import paddle.distributed as dist
322
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

0 commit comments

Comments
 (0)