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
OpenDAS
torch-scatter
Commits
d98dfe92
Commit
d98dfe92
authored
Feb 17, 2020
by
rusty1s
Browse files
error handling
parent
d3cb8b31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
torch_scatter/__init__.py
torch_scatter/__init__.py
+6
-7
No files found.
torch_scatter/__init__.py
View file @
d98dfe92
...
@@ -12,13 +12,12 @@ try:
...
@@ -12,13 +12,12 @@ try:
torch
.
ops
.
load_library
(
importlib
.
machinery
.
PathFinder
().
find_spec
(
torch
.
ops
.
load_library
(
importlib
.
machinery
.
PathFinder
().
find_spec
(
library
,
[
osp
.
dirname
(
__file__
)]).
origin
)
library
,
[
osp
.
dirname
(
__file__
)]).
origin
)
except
OSError
as
e
:
except
OSError
as
e
:
if
'undefined symbol'
in
str
(
e
):
major
,
minor
=
[
int
(
x
)
for
x
in
torch
.
__version__
.
split
(
'.'
)[:
2
]]
major
,
minor
=
[
int
(
x
)
for
x
in
torch
.
__version__
.
split
(
'.'
)[:
2
]]
t_major
,
t_minor
=
expected_torch_version
t_major
,
t_minor
=
expected_torch_version
if
major
!=
t_major
or
(
major
==
t_major
and
minor
!=
t_minor
):
if
major
!=
t_major
or
(
major
==
t_major
and
minor
!=
t_minor
):
raise
RuntimeError
(
raise
RuntimeError
(
f
'Expected PyTorch version
{
t_major
}
.
{
t_minor
}
but found '
f
'Expected PyTorch version
{
t_major
}
.
{
t_minor
}
but found '
f
'version
{
major
}
.
{
minor
}
.'
)
f
'version
{
major
}
.
{
minor
}
.'
)
raise
OSError
(
e
)
raise
OSError
(
e
)
except
AttributeError
as
e
:
except
AttributeError
as
e
:
if
os
.
getenv
(
'BUILD_DOCS'
,
'0'
)
!=
'1'
:
if
os
.
getenv
(
'BUILD_DOCS'
,
'0'
)
!=
'1'
:
...
...
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