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
3c4582ed
"docs/vscode:/vscode.git/clone" did not exist on "3ff5bb3e6763af92dea8aae0ca2d5745a8b9043c"
Commit
3c4582ed
authored
Feb 13, 2020
by
rusty1s
Browse files
better loading
parent
7dc7496d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
26 deletions
+30
-26
.travis.yml
.travis.yml
+4
-5
script/rename_wheel.py
script/rename_wheel.py
+14
-9
torch_scatter/__init__.py
torch_scatter/__init__.py
+3
-3
torch_scatter/scatter.py
torch_scatter/scatter.py
+3
-3
torch_scatter/segment_coo.py
torch_scatter/segment_coo.py
+3
-3
torch_scatter/segment_csr.py
torch_scatter/segment_csr.py
+3
-3
No files found.
.travis.yml
View file @
3c4582ed
...
...
@@ -77,11 +77,10 @@ install:
script
:
-
if [ "${PYTHON_VERSION}" != "3.5" ]; then pip install flake8 && flake8 .; fi
-
if [ "${PYTHON_VERSION}" = "3.5" ]; then pip install zzip; fi
-
python setup.py test
after_success
:
-
python setup.py bdist_wheel --dist-dir=dist/torch-${TORCH_VERSION}
/${IDX}
-
python script/rename_wheel.py
-
python setup.py bdist_wheel --dist-dir=dist/torch-${TORCH_VERSION}
-
python script/rename_wheel.py
${IDX}
-
pip install codecov && codecov
deploy
:
provider
:
s3
...
...
@@ -90,8 +89,8 @@ deploy:
access_key_id
:
AKIAJB7S6NJ5OM5MAAGA
secret_access_key
:
${S3_SECRET_ACCESS_KEY}
bucket
:
pytorch-scatter
local_dir
:
dist/torch-${TORCH_VERSION}
/${IDX}
upload_dir
:
whl/torch-${TORCH_VERSION}
/${IDX}
local_dir
:
dist/torch-${TORCH_VERSION}
upload_dir
:
whl/torch-${TORCH_VERSION}
acl
:
public_read
on
:
repo
:
rusty1s/pytorch_scatter
...
...
script/rename_wheel.py
View file @
3c4582ed
import
sys
import
os
import
os.path
as
osp
import
glob
import
shutil
idx
=
sys
.
argv
[
1
]
assert
idx
in
[
'cpu'
,
'cu92'
,
'cu100'
,
'cu101'
]
dist_dir
=
osp
.
join
(
osp
.
dirname
(
osp
.
abspath
(
__file__
)),
'..'
,
'dist'
)
wheels
=
glob
.
glob
(
osp
.
join
(
'dist'
,
'**'
,
'*.whl'
),
recursive
=
True
)
for
wheel
in
wheels
:
idx
=
wheel
.
split
(
osp
.
sep
)[
-
2
]
if
idx
not
in
[
'cpu'
,
'cu92'
,
'cu100'
,
'cu101'
]:
continue
name
=
wheel
.
split
(
osp
.
sep
)[
-
1
]
if
idx
in
name
:
if
idx
in
wheel
:
continue
names
=
name
.
split
(
'-'
)
name
=
'-'
.
join
(
names
[:
-
4
]
+
[
names
[
-
4
]
+
'%2B'
+
idx
]
+
names
[
-
2
:])
new_wheel
=
osp
.
join
(
*
wheel
.
split
(
osp
.
sep
)[:
-
1
],
name
)
os
.
rename
(
wheel
,
new_wheel
)
paths
=
wheel
.
split
(
osp
.
sep
)
names
=
paths
[
-
1
].
split
(
'-'
)
name
=
'-'
.
join
(
names
[:
-
4
]
+
[
'latest+'
+
idx
]
+
names
[
-
3
:])
shutil
.
copyfile
(
wheel
,
osp
.
join
(
*
paths
[:
-
1
],
name
))
name
=
'-'
.
join
(
names
[:
-
4
]
+
[
names
[
-
4
]
+
'+'
+
idx
]
+
names
[
-
3
:])
os
.
rename
(
wheel
,
osp
.
join
(
*
paths
[:
-
1
],
name
))
torch_scatter/__init__.py
View file @
3c4582ed
# flake8: noqa
import
importli
b
import
glo
b
import
os.path
as
osp
import
torch
...
...
@@ -9,8 +9,8 @@ __version__ = '2.0.3'
expected_torch_version
=
(
1
,
4
)
try
:
torch
.
ops
.
load_library
(
importlib
.
machinery
.
PathFinder
().
find_spec
(
'_version'
,
[
osp
.
dirname
(
__file__
)
]).
origin
)
torch
.
ops
.
load_library
(
glob
.
glob
(
osp
.
join
(
osp
.
dirname
(
__file__
)
,
'_version.*'
))[
0
]
)
except
OSError
as
e
:
if
'undefined symbol'
in
str
(
e
):
major
,
minor
=
[
int
(
x
)
for
x
in
torch
.
__version__
.
split
(
'.'
)[:
2
]]
...
...
torch_scatter/scatter.py
View file @
3c4582ed
import
importli
b
import
glo
b
import
os.path
as
osp
from
typing
import
Optional
,
Tuple
...
...
@@ -6,8 +6,8 @@ import torch
from
.utils
import
broadcast
torch
.
ops
.
load_library
(
importlib
.
machinery
.
PathFinder
().
find_spec
(
'_scatter'
,
[
osp
.
dirname
(
__file__
)
]).
origin
)
torch
.
ops
.
load_library
(
glob
.
glob
(
osp
.
join
(
osp
.
dirname
(
__file__
)
,
'_scatter.*'
))[
0
]
)
@
torch
.
jit
.
script
...
...
torch_scatter/segment_coo.py
View file @
3c4582ed
import
importli
b
import
glo
b
import
os.path
as
osp
from
typing
import
Optional
,
Tuple
import
torch
torch
.
ops
.
load_library
(
importlib
.
machinery
.
PathFinder
().
find_spec
(
'_segment_coo'
,
[
osp
.
dirname
(
__file__
)
]).
origin
)
torch
.
ops
.
load_library
(
glob
.
glob
(
osp
.
join
(
osp
.
dirname
(
__file__
)
,
'_segment_coo.*'
))[
0
]
)
@
torch
.
jit
.
script
...
...
torch_scatter/segment_csr.py
View file @
3c4582ed
import
importli
b
import
glo
b
import
os.path
as
osp
from
typing
import
Optional
,
Tuple
import
torch
torch
.
ops
.
load_library
(
importlib
.
machinery
.
PathFinder
().
find_spec
(
'_segment_csr'
,
[
osp
.
dirname
(
__file__
)
]).
origin
)
torch
.
ops
.
load_library
(
glob
.
glob
(
osp
.
join
(
osp
.
dirname
(
__file__
)
,
'_segment_csr.*'
))[
0
]
)
@
torch
.
jit
.
script
...
...
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