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
244 additions
and
0 deletions
+244
-0
src/transformers/models/layoutlm/__init__.py
src/transformers/models/layoutlm/__init__.py
+14
-0
src/transformers/models/longformer/__init__.py
src/transformers/models/longformer/__init__.py
+14
-0
src/transformers/models/lxmert/__init__.py
src/transformers/models/lxmert/__init__.py
+14
-0
src/transformers/models/marian/__init__.py
src/transformers/models/marian/__init__.py
+14
-0
src/transformers/models/marian/convert_marian_tatoeba_to_pytorch.py
...ormers/models/marian/convert_marian_tatoeba_to_pytorch.py
+14
-0
src/transformers/models/marian/convert_marian_to_pytorch.py
src/transformers/models/marian/convert_marian_to_pytorch.py
+14
-0
src/transformers/models/marian/tokenization_marian.py
src/transformers/models/marian/tokenization_marian.py
+14
-0
src/transformers/models/mbart/__init__.py
src/transformers/models/mbart/__init__.py
+14
-0
src/transformers/models/mbart/convert_mbart_original_checkpoint_to_pytorch.py
...els/mbart/convert_mbart_original_checkpoint_to_pytorch.py
+14
-0
src/transformers/models/mbart/modeling_mbart.py
src/transformers/models/mbart/modeling_mbart.py
+14
-0
src/transformers/models/mmbt/__init__.py
src/transformers/models/mmbt/__init__.py
+14
-0
src/transformers/models/mobilebert/__init__.py
src/transformers/models/mobilebert/__init__.py
+14
-0
src/transformers/models/mobilebert/configuration_mobilebert.py
...ransformers/models/mobilebert/configuration_mobilebert.py
+2
-0
src/transformers/models/mobilebert/convert_mobilebert_original_tf_checkpoint_to_pytorch.py
...t/convert_mobilebert_original_tf_checkpoint_to_pytorch.py
+14
-0
src/transformers/models/mobilebert/tokenization_mobilebert.py
...transformers/models/mobilebert/tokenization_mobilebert.py
+2
-0
src/transformers/models/mobilebert/tokenization_mobilebert_fast.py
...formers/models/mobilebert/tokenization_mobilebert_fast.py
+2
-0
src/transformers/models/mt5/__init__.py
src/transformers/models/mt5/__init__.py
+14
-0
src/transformers/models/openai/__init__.py
src/transformers/models/openai/__init__.py
+14
-0
src/transformers/models/pegasus/__init__.py
src/transformers/models/pegasus/__init__.py
+14
-0
src/transformers/models/phobert/__init__.py
src/transformers/models/phobert/__init__.py
+14
-0
No files found.
src/transformers/models/layoutlm/__init__.py
View file @
00aa9dbc
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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
...file_utils
import
is_tokenizers_available
,
is_torch_available
from
.configuration_layoutlm
import
LAYOUTLM_PRETRAINED_CONFIG_ARCHIVE_MAP
,
LayoutLMConfig
from
.configuration_layoutlm
import
LAYOUTLM_PRETRAINED_CONFIG_ARCHIVE_MAP
,
LayoutLMConfig
from
.tokenization_layoutlm
import
LayoutLMTokenizer
from
.tokenization_layoutlm
import
LayoutLMTokenizer
...
...
src/transformers/models/longformer/__init__.py
View file @
00aa9dbc
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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_tokenizers_available
,
is_torch_available
from
...file_utils
import
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_longformer
import
LONGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP
,
LongformerConfig
from
.configuration_longformer
import
LONGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP
,
LongformerConfig
from
.tokenization_longformer
import
LongformerTokenizer
from
.tokenization_longformer
import
LongformerTokenizer
...
...
src/transformers/models/lxmert/__init__.py
View file @
00aa9dbc
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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_tokenizers_available
,
is_torch_available
from
...file_utils
import
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_lxmert
import
LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
LxmertConfig
from
.configuration_lxmert
import
LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
LxmertConfig
from
.tokenization_lxmert
import
LxmertTokenizer
from
.tokenization_lxmert
import
LxmertTokenizer
...
...
src/transformers/models/marian/__init__.py
View file @
00aa9dbc
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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_torch_available
from
...file_utils
import
is_sentencepiece_available
,
is_tf_available
,
is_torch_available
from
.configuration_marian
import
MarianConfig
from
.configuration_marian
import
MarianConfig
...
...
src/transformers/models/marian/convert_marian_tatoeba_to_pytorch.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
argparse
import
argparse
import
os
import
os
from
pathlib
import
Path
from
pathlib
import
Path
...
...
src/transformers/models/marian/convert_marian_to_pytorch.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
argparse
import
argparse
import
json
import
json
import
os
import
os
...
...
src/transformers/models/marian/tokenization_marian.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
json
import
json
import
re
import
re
import
warnings
import
warnings
...
...
src/transformers/models/mbart/__init__.py
View file @
00aa9dbc
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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
...file_utils
import
is_sentencepiece_available
,
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_mbart
import
MBartConfig
from
.configuration_mbart
import
MBartConfig
...
...
src/transformers/models/mbart/convert_mbart_original_checkpoint_to_pytorch.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
argparse
import
argparse
import
torch
import
torch
...
...
src/transformers/models/mbart/modeling_mbart.py
View file @
00aa9dbc
# Copyright 2020 The Facebook AI Research Team Authors and The HuggingFace Inc. team.
#
# 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
..bart.modeling_bart
import
BartForConditionalGeneration
from
..bart.modeling_bart
import
BartForConditionalGeneration
from
.configuration_mbart
import
MBartConfig
from
.configuration_mbart
import
MBartConfig
...
...
src/transformers/models/mmbt/__init__.py
View file @
00aa9dbc
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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
...file_utils
import
is_torch_available
from
.configuration_mmbt
import
MMBTConfig
from
.configuration_mmbt
import
MMBTConfig
...
...
src/transformers/models/mobilebert/__init__.py
View file @
00aa9dbc
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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_tokenizers_available
,
is_torch_available
from
...file_utils
import
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_mobilebert
import
MOBILEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
MobileBertConfig
from
.configuration_mobilebert
import
MOBILEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
MobileBertConfig
from
.tokenization_mobilebert
import
MobileBertTokenizer
from
.tokenization_mobilebert
import
MobileBertTokenizer
...
...
src/transformers/models/mobilebert/configuration_mobilebert.py
View file @
00aa9dbc
# coding=utf-8
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# You may obtain a copy of the License at
...
...
src/transformers/models/mobilebert/convert_mobilebert_original_tf_checkpoint_to_pytorch.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
argparse
import
argparse
import
torch
import
torch
...
...
src/transformers/models/mobilebert/tokenization_mobilebert.py
View file @
00aa9dbc
# coding=utf-8
# coding=utf-8
#
#
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# You may obtain a copy of the License at
...
...
src/transformers/models/mobilebert/tokenization_mobilebert_fast.py
View file @
00aa9dbc
# coding=utf-8
# coding=utf-8
#
#
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# You may obtain a copy of the License at
...
...
src/transformers/models/mt5/__init__.py
View file @
00aa9dbc
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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
...file_utils
import
is_sentencepiece_available
,
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_mt5
import
MT5Config
from
.configuration_mt5
import
MT5Config
...
...
src/transformers/models/openai/__init__.py
View file @
00aa9dbc
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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_tokenizers_available
,
is_torch_available
from
...file_utils
import
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_openai
import
OPENAI_GPT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
OpenAIGPTConfig
from
.configuration_openai
import
OPENAI_GPT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
OpenAIGPTConfig
from
.tokenization_openai
import
OpenAIGPTTokenizer
from
.tokenization_openai
import
OpenAIGPTTokenizer
...
...
src/transformers/models/pegasus/__init__.py
View file @
00aa9dbc
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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
...file_utils
import
is_sentencepiece_available
,
is_tf_available
,
is_tokenizers_available
,
is_torch_available
from
.configuration_pegasus
import
PegasusConfig
from
.configuration_pegasus
import
PegasusConfig
...
...
src/transformers/models/phobert/__init__.py
View file @
00aa9dbc
...
@@ -2,4 +2,18 @@
...
@@ -2,4 +2,18 @@
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# 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.
# 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
.tokenization_phobert
import
PhobertTokenizer
from
.tokenization_phobert
import
PhobertTokenizer
Prev
1
…
5
6
7
8
9
10
11
12
13
…
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