Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
00aa9dbc
Unverified
Commit
00aa9dbc
authored
Dec 07, 2020
by
Sylvain Gugger
Committed by
GitHub
Dec 07, 2020
Browse files
Copyright (#8970)
* Add copyright everywhere missing * Style
parent
c108d0b5
Changes
318
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
266 additions
and
1 deletion
+266
-1
src/transformers/models/prophetnet/__init__.py
src/transformers/models/prophetnet/__init__.py
+14
-0
src/transformers/models/rag/__init__.py
src/transformers/models/rag/__init__.py
+14
-0
src/transformers/models/reformer/__init__.py
src/transformers/models/reformer/__init__.py
+14
-0
src/transformers/models/retribert/__init__.py
src/transformers/models/retribert/__init__.py
+14
-0
src/transformers/models/roberta/__init__.py
src/transformers/models/roberta/__init__.py
+14
-0
src/transformers/models/squeezebert/__init__.py
src/transformers/models/squeezebert/__init__.py
+14
-0
src/transformers/models/t5/__init__.py
src/transformers/models/t5/__init__.py
+14
-0
src/transformers/models/transfo_xl/__init__.py
src/transformers/models/transfo_xl/__init__.py
+14
-0
src/transformers/models/xlm/__init__.py
src/transformers/models/xlm/__init__.py
+14
-0
src/transformers/models/xlm_prophetnet/__init__.py
src/transformers/models/xlm_prophetnet/__init__.py
+14
-0
src/transformers/models/xlm_roberta/__init__.py
src/transformers/models/xlm_roberta/__init__.py
+14
-0
src/transformers/models/xlnet/__init__.py
src/transformers/models/xlnet/__init__.py
+14
-0
src/transformers/optimization_tf.py
src/transformers/optimization_tf.py
+1
-1
src/transformers/testing_utils.py
src/transformers/testing_utils.py
+14
-0
src/transformers/trainer_tf.py
src/transformers/trainer_tf.py
+13
-0
src/transformers/training_args.py
src/transformers/training_args.py
+14
-0
src/transformers/training_args_tf.py
src/transformers/training_args_tf.py
+14
-0
src/transformers/utils/hp_naming.py
src/transformers/utils/hp_naming.py
+14
-0
src/transformers/utils/model_parallel_utils.py
src/transformers/utils/model_parallel_utils.py
+14
-0
src/transformers/utils/sentencepiece_model_pb2.py
src/transformers/utils/sentencepiece_model_pb2.py
+14
-0
No files found.
src/transformers/models/prophetnet/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_torch_available
from
.configuration_prophetnet
import
PROPHETNET_PRETRAINED_CONFIG_ARCHIVE_MAP
,
ProphetNetConfig
from
.tokenization_prophetnet
import
ProphetNetTokenizer
...
...
src/transformers/models/rag/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_torch_available
from
.configuration_rag
import
RagConfig
from
.retrieval_rag
import
RagRetriever
...
...
src/transformers/models/reformer/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_sentencepiece_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_reformer
import
REFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP
,
ReformerConfig
...
...
src/transformers/models/retribert/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_tokenizers_available
,
is_torch_available
from
.configuration_retribert
import
RETRIBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
RetriBertConfig
from
.tokenization_retribert
import
RetriBertTokenizer
...
...
src/transformers/models/roberta/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_flax_available
,
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_roberta
import
ROBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP
,
RobertaConfig
from
.tokenization_roberta
import
RobertaTokenizer
...
...
src/transformers/models/squeezebert/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_tokenizers_available
,
is_torch_available
from
.configuration_squeezebert
import
SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
SqueezeBertConfig
from
.tokenization_squeezebert
import
SqueezeBertTokenizer
...
...
src/transformers/models/t5/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_sentencepiece_available
,
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_t5
import
T5_PRETRAINED_CONFIG_ARCHIVE_MAP
,
T5Config
...
...
src/transformers/models/transfo_xl/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_tf_available
,
is_torch_available
from
.configuration_transfo_xl
import
TRANSFO_XL_PRETRAINED_CONFIG_ARCHIVE_MAP
,
TransfoXLConfig
from
.tokenization_transfo_xl
import
TransfoXLCorpus
,
TransfoXLTokenizer
...
...
src/transformers/models/xlm/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_tf_available
,
is_torch_available
from
.configuration_xlm
import
XLM_PRETRAINED_CONFIG_ARCHIVE_MAP
,
XLMConfig
from
.tokenization_xlm
import
XLMTokenizer
...
...
src/transformers/models/xlm_prophetnet/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_sentencepiece_available
,
is_torch_available
from
.configuration_xlm_prophetnet
import
XLM_PROPHETNET_PRETRAINED_CONFIG_ARCHIVE_MAP
,
XLMProphetNetConfig
...
...
src/transformers/models/xlm_roberta/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_sentencepiece_available
,
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_xlm_roberta
import
XLM_ROBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP
,
XLMRobertaConfig
...
...
src/transformers/models/xlnet/__init__.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. 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
...file_utils
import
is_sentencepiece_available
,
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_xlnet
import
XLNET_PRETRAINED_CONFIG_ARCHIVE_MAP
,
XLNetConfig
...
...
src/transformers/optimization_tf.py
View file @
00aa9dbc
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
# Copyright 2019 The TensorFlow Authors
, The Hugging Face Team
. 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.
...
...
src/transformers/testing_utils.py
View file @
00aa9dbc
# Copyright 2020 The HuggingFace Team. 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
inspect
import
logging
import
os
...
...
src/transformers/trainer_tf.py
View file @
00aa9dbc
# Copyright 2020 The HuggingFace Team. 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.
"""Tensorflow trainer class."""
import
datetime
...
...
src/transformers/training_args.py
View file @
00aa9dbc
# Copyright 2020 The HuggingFace Team. 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
dataclasses
import
json
import
os
...
...
src/transformers/training_args_tf.py
View file @
00aa9dbc
# Copyright 2020 The HuggingFace Team. 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
warnings
from
dataclasses
import
dataclass
,
field
from
typing
import
Tuple
...
...
src/transformers/utils/hp_naming.py
View file @
00aa9dbc
# Copyright 2020 The HuggingFace Team. 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
import
re
...
...
src/transformers/utils/model_parallel_utils.py
View file @
00aa9dbc
# coding=utf-8
# Copyright 2020 The HuggingFace Team. 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
math
import
ceil
...
...
src/transformers/utils/sentencepiece_model_pb2.py
View file @
00aa9dbc
...
...
@@ -2,6 +2,20 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: sentencepiece_model.proto
# Copyright 2020 The HuggingFace Team. 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
...
...
Prev
1
…
6
7
8
9
10
11
12
13
14
…
16
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment