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
226973a9
"docs/vscode:/vscode.git/clone" did not exist on "c1f209dadd3ec595de10f8a3560b29e0225d21ab"
Unverified
Commit
226973a9
authored
Feb 09, 2021
by
Patrick von Platen
Committed by
GitHub
Feb 09, 2021
Browse files
fix import (#10103)
parent
4cda2d73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/transformers/file_utils.py
src/transformers/file_utils.py
+5
-1
No files found.
src/transformers/file_utils.py
View file @
226973a9
...
...
@@ -144,7 +144,11 @@ try:
_faiss_version
=
importlib_metadata
.
version
(
"faiss"
)
logger
.
debug
(
f
"Successfully imported faiss version
{
_faiss_version
}
"
)
except
importlib_metadata
.
PackageNotFoundError
:
_faiss_available
=
False
try
:
_faiss_version
=
importlib_metadata
.
version
(
"faiss-cpu"
)
logger
.
debug
(
f
"Successfully imported faiss version
{
_faiss_version
}
"
)
except
importlib_metadata
.
PackageNotFoundError
:
_faiss_available
=
False
_scatter_available
=
importlib
.
util
.
find_spec
(
"torch_scatter"
)
is
not
None
...
...
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