Commit fc91b516 authored by rusty1s's avatar rusty1s
Browse files

replaced importlib with glob

parent 6640a5e4
language: shell language: shell
os: os:
- linux # - linux
- osx # - osx
- windows - windows
env: env:
global: global:
- CUDA_HOME=/usr/local/cuda - CUDA_HOME=/usr/local/cuda
jobs: jobs:
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cpu # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cpu
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu92 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu92
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu100 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu100
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu101 - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu101
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cpu # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cpu
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu92 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu92
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu100 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu100
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu101 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu101
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cpu # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cpu
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu92 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu92
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu100 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu100
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu101 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu101
jobs: jobs:
exclude: # Exclude *all* macOS CUDA jobs and Windows CUDA 9.2/10.0 jobs. exclude: # Exclude *all* macOS CUDA jobs and Windows CUDA 9.2/10.0 jobs.
...@@ -65,7 +65,6 @@ install: ...@@ -65,7 +65,6 @@ install:
- source script/torch.sh - source script/torch.sh
- pip install flake8 codecov - pip install flake8 codecov
- python setup.py install - python setup.py install
script: script:
- flake8 . - flake8 .
- python setup.py test - python setup.py test
...@@ -85,6 +84,6 @@ deploy: ...@@ -85,6 +84,6 @@ deploy:
acl: public_read acl: public_read
on: on:
repo: rusty1s/pytorch_scatter repo: rusty1s/pytorch_scatter
tags: true branch: master
notifications: notifications:
email: false email: false
# flake8: noqa # flake8: noqa
import os import os
import importlib import glob
import os.path as osp import os.path as osp
import torch import torch
...@@ -10,8 +10,8 @@ __version__ = '2.0.3' ...@@ -10,8 +10,8 @@ __version__ = '2.0.3'
expected_torch_version = (1, 4) expected_torch_version = (1, 4)
try: try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec( torch.ops.load_library(
'_version', [osp.dirname(__file__)]).origin) glob.glob(osp.join(osp.dirname(__file__), '_version.*'))[0])
except OSError as e: except OSError as e:
if 'undefined symbol' in str(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]]
......
import os import os
import importlib import glob
import os.path as osp import os.path as osp
from typing import Optional, Tuple from typing import Optional, Tuple
...@@ -8,8 +8,8 @@ import torch ...@@ -8,8 +8,8 @@ import torch
from .utils import broadcast from .utils import broadcast
try: try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec( torch.ops.load_library(
'_scatter', [osp.dirname(__file__)]).origin) glob.glob(osp.join(osp.dirname(__file__), '_scatter.*'))[0])
except OSError as e: except OSError as e:
if os.getenv('BUILD_DOCS', '0') == '1': if os.getenv('BUILD_DOCS', '0') == '1':
pass pass
......
import os import os
import importlib import glob
import os.path as osp import os.path as osp
from typing import Optional, Tuple from typing import Optional, Tuple
import torch import torch
try: try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec( torch.ops.load_library(
'_segment_coo', [osp.dirname(__file__)]).origin) glob.glob(osp.join(osp.dirname(__file__), '_segment_coo.*'))[0])
except OSError as e: except OSError as e:
if os.getenv('BUILD_DOCS', '0') == '1': if os.getenv('BUILD_DOCS', '0') == '1':
pass pass
......
import os import os
import importlib import glob
import os.path as osp import os.path as osp
from typing import Optional, Tuple from typing import Optional, Tuple
import torch import torch
try: try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec( torch.ops.load_library(
'_segment_csr', [osp.dirname(__file__)]).origin) glob.glob(osp.join(osp.dirname(__file__), '_segment_csr.*'))[0])
except OSError as e: except OSError as e:
if os.getenv('BUILD_DOCS', '0') == '1': if os.getenv('BUILD_DOCS', '0') == '1':
pass pass
......
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