Commit 2e472df8 authored by rusty1s's avatar rusty1s
Browse files

except build docs

parent be2722e1
......@@ -20,10 +20,12 @@ except OSError as e:
raise RuntimeError(
f'Expected PyTorch version {t_major}.{t_minor} but found '
f'version {major}.{minor}.')
raise OSError(e)
except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') == '1':
pass
else:
raise OSError(e)
raise AttributeError(e)
cuda_version = torch.ops.torch_scatter.cuda_version()
if cuda_version != -1 and torch.version.cuda is not None: # pragma: no cover
......
......@@ -10,11 +10,11 @@ from .utils import broadcast
try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_scatter', [osp.dirname(__file__)]).origin)
except OSError as e:
except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') == '1':
pass
else:
raise OSError(e)
raise AttributeError(e)
@torch.jit.script
......
......@@ -8,11 +8,11 @@ import torch
try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_segment_coo', [osp.dirname(__file__)]).origin)
except OSError as e:
except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') == '1':
pass
else:
raise OSError(e)
raise AttributeError(e)
@torch.jit.script
......
......@@ -8,11 +8,11 @@ import torch
try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_segment_csr', [osp.dirname(__file__)]).origin)
except OSError as e:
except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') == '1':
pass
else:
raise OSError(e)
raise AttributeError(e)
@torch.jit.script
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment