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

except build docs

parent be2722e1
...@@ -20,10 +20,12 @@ except OSError as e: ...@@ -20,10 +20,12 @@ except OSError as e:
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)
except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') == '1': if os.getenv('BUILD_DOCS', '0') == '1':
pass pass
else: else:
raise OSError(e) raise AttributeError(e)
cuda_version = torch.ops.torch_scatter.cuda_version() cuda_version = torch.ops.torch_scatter.cuda_version()
if cuda_version != -1 and torch.version.cuda is not None: # pragma: no cover if cuda_version != -1 and torch.version.cuda is not None: # pragma: no cover
......
...@@ -10,11 +10,11 @@ from .utils import broadcast ...@@ -10,11 +10,11 @@ from .utils import broadcast
try: try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec( torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_scatter', [osp.dirname(__file__)]).origin) '_scatter', [osp.dirname(__file__)]).origin)
except OSError as e: except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') == '1': if os.getenv('BUILD_DOCS', '0') == '1':
pass pass
else: else:
raise OSError(e) raise AttributeError(e)
@torch.jit.script @torch.jit.script
......
...@@ -8,11 +8,11 @@ import torch ...@@ -8,11 +8,11 @@ import torch
try: try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec( torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_segment_coo', [osp.dirname(__file__)]).origin) '_segment_coo', [osp.dirname(__file__)]).origin)
except OSError as e: except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') == '1': if os.getenv('BUILD_DOCS', '0') == '1':
pass pass
else: else:
raise OSError(e) raise AttributeError(e)
@torch.jit.script @torch.jit.script
......
...@@ -8,11 +8,11 @@ import torch ...@@ -8,11 +8,11 @@ import torch
try: try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec( torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_segment_csr', [osp.dirname(__file__)]).origin) '_segment_csr', [osp.dirname(__file__)]).origin)
except OSError as e: except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') == '1': if os.getenv('BUILD_DOCS', '0') == '1':
pass pass
else: else:
raise OSError(e) raise AttributeError(e)
@torch.jit.script @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