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
146c5212
Unverified
Commit
146c5212
authored
Mar 05, 2020
by
Lysandre Debut
Committed by
GitHub
Mar 05, 2020
Browse files
Merge branch 'master' into add_models_special_tokens_to_specific_configs
parents
f5b50c6b
b623ddc0
Changes
161
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
utils/link_tester.py
utils/link_tester.py
+4
-1
No files found.
utils/link_tester.py
View file @
146c5212
...
@@ -14,6 +14,9 @@ import requests
...
@@ -14,6 +14,9 @@ import requests
REGEXP_FIND_S3_LINKS
=
r
"""([\"'])(https:\/\/s3)(.*)?\1"""
REGEXP_FIND_S3_LINKS
=
r
"""([\"'])(https:\/\/s3)(.*)?\1"""
S3_BUCKET_PREFIX
=
"https://s3.amazonaws.com/models.huggingface.co/bert"
def
list_python_files_in_repository
():
def
list_python_files_in_repository
():
""" List all python files in the repository.
""" List all python files in the repository.
...
@@ -36,7 +39,7 @@ def find_all_links(file_paths):
...
@@ -36,7 +39,7 @@ def find_all_links(file_paths):
for
path
in
file_paths
:
for
path
in
file_paths
:
links
+=
scan_code_for_links
(
path
)
links
+=
scan_code_for_links
(
path
)
return
links
return
[
link
for
link
in
links
if
link
!=
S3_BUCKET_PREFIX
]
def
scan_code_for_links
(
source
):
def
scan_code_for_links
(
source
):
...
...
Prev
1
…
5
6
7
8
9
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