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
18 changed files
with
136 additions
and
10 deletions
+136
-10
tests/test_tokenization_layoutlm.py
tests/test_tokenization_layoutlm.py
+1
-1
tests/test_tokenization_lxmert.py
tests/test_tokenization_lxmert.py
+1
-1
tests/test_tokenization_mbart.py
tests/test_tokenization_mbart.py
+14
-0
tests/test_tokenization_pegasus.py
tests/test_tokenization_pegasus.py
+14
-0
tests/test_tokenization_rag.py
tests/test_tokenization_rag.py
+14
-0
tests/test_tokenization_reformer.py
tests/test_tokenization_reformer.py
+1
-2
tests/test_tokenization_roberta.py
tests/test_tokenization_roberta.py
+1
-1
tests/test_tokenization_transfo_xl.py
tests/test_tokenization_transfo_xl.py
+1
-1
tests/test_tokenization_utils.py
tests/test_tokenization_utils.py
+1
-0
tests/test_tokenization_xlm.py
tests/test_tokenization_xlm.py
+1
-1
tests/test_tokenization_xlm_roberta.py
tests/test_tokenization_xlm_roberta.py
+1
-1
tests/test_tokenization_xlnet.py
tests/test_tokenization_xlnet.py
+1
-1
tests/test_trainer_callback.py
tests/test_trainer_callback.py
+14
-0
tests/test_trainer_distributed.py
tests/test_trainer_distributed.py
+14
-0
tests/test_trainer_tpu.py
tests/test_trainer_tpu.py
+14
-0
tests/test_utils_check_copies.py
tests/test_utils_check_copies.py
+14
-0
tests/test_versions_utils.py
tests/test_versions_utils.py
+14
-0
utils/link_tester.py
utils/link_tester.py
+15
-1
No files found.
tests/test_tokenization_layoutlm.py
View file @
00aa9dbc
# coding=utf-8
# coding=utf-8
# Copyright 2018 The Microsoft Research Asia LayoutLM Team Authors.
# Copyright 2018 The Microsoft Research Asia LayoutLM Team Authors
, The Hugging Face Team
.
#
#
# 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.
...
...
tests/test_tokenization_lxmert.py
View file @
00aa9dbc
# coding=utf-8
# coding=utf-8
# Copyright 2018 LXMERT Authors.
# Copyright 2018 LXMERT Authors
, The Hugging Face Team
.
#
#
# 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.
...
...
tests/test_tokenization_mbart.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
tempfile
import
tempfile
import
unittest
import
unittest
...
...
tests/test_tokenization_pegasus.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
unittest
import
unittest
from
transformers
import
PegasusTokenizer
,
PegasusTokenizerFast
from
transformers
import
PegasusTokenizer
,
PegasusTokenizerFast
...
...
tests/test_tokenization_rag.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
os
import
os
import
shutil
import
shutil
...
...
tests/test_tokenization_reformer.py
View file @
00aa9dbc
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
# Copyright 2018 The Google AI Language Team Authors.
#
#
# 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.
...
...
tests/test_tokenization_roberta.py
View file @
00aa9dbc
# coding=utf-8
# coding=utf-8
# Copyright 20
18
The
Google AI Languag
e Team A
uthors
.
# Copyright 20
20
The
HuggingFac
e Team
.
A
ll 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.
...
...
tests/test_tokenization_transfo_xl.py
View file @
00aa9dbc
# coding=utf-8
# coding=utf-8
# Copyright 20
18
The
Google AI Languag
e Team A
uthors
.
# Copyright 20
20
The
HuggingFac
e Team
.
A
ll 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.
...
...
tests/test_tokenization_utils.py
View file @
00aa9dbc
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
pickle
import
pickle
import
unittest
import
unittest
from
typing
import
Callable
,
Optional
from
typing
import
Callable
,
Optional
...
...
tests/test_tokenization_xlm.py
View file @
00aa9dbc
# coding=utf-8
# coding=utf-8
# Copyright 20
18
The
Google AI Languag
e Team A
uthors
.
# Copyright 20
20
The
HuggingFac
e Team
.
A
ll 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.
...
...
tests/test_tokenization_xlm_roberta.py
View file @
00aa9dbc
# coding=utf-8
# coding=utf-8
# Copyright 20
18
The
Google AI Languag
e Team A
uthors
.
# Copyright 20
20
The
HuggingFac
e Team
.
A
ll 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.
...
...
tests/test_tokenization_xlnet.py
View file @
00aa9dbc
# coding=utf-8
# coding=utf-8
# Copyright 20
18
The
Google AI Languag
e Team A
uthors
.
# Copyright 20
20
The
HuggingFac
e Team
.
A
ll 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.
...
...
tests/test_trainer_callback.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
shutil
import
shutil
import
tempfile
import
tempfile
import
unittest
import
unittest
...
...
tests/test_trainer_distributed.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
sys
import
sys
from
typing
import
Dict
from
typing
import
Dict
...
...
tests/test_trainer_tpu.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.
# This test is meant to be run in on an instance with TPUs like this:
# This test is meant to be run in on an instance with TPUs like this:
#
#
# python examples/xla_spawn.py --num_cores=8 tests/test_trainer_tpu.py
# python examples/xla_spawn.py --num_cores=8 tests/test_trainer_tpu.py
...
...
tests/test_utils_check_copies.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
os
import
os
import
re
import
re
import
shutil
import
shutil
...
...
tests/test_versions_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
sys
import
sys
import
numpy
import
numpy
...
...
utils/link_tester.py
View file @
00aa9dbc
""" Link tester.
# 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.
"""
Link tester.
This little utility reads all the python files in the repository,
This little utility reads all the python files in the repository,
scans for links pointing to S3 and tests the links one by one. Raises an error
scans for links pointing to S3 and tests the links one by one. Raises an error
...
...
Prev
1
…
12
13
14
15
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