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
dgl
Commits
a8b27b47
Unverified
Commit
a8b27b47
authored
Aug 17, 2020
by
Quan (Andy) Gan
Committed by
GitHub
Aug 17, 2020
Browse files
disable batching blocks (#2034)
parent
a9c4df67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
python/dgl/batch.py
python/dgl/batch.py
+2
-0
No files found.
python/dgl/batch.py
View file @
a8b27b47
...
@@ -161,6 +161,8 @@ def batch(graphs, ndata=ALL, edata=ALL, *, node_attrs=None, edge_attrs=None):
...
@@ -161,6 +161,8 @@ def batch(graphs, ndata=ALL, edata=ALL, *, node_attrs=None, edge_attrs=None):
if
not
(
is_all
(
edata
)
or
isinstance
(
edata
,
list
)):
if
not
(
is_all
(
edata
)
or
isinstance
(
edata
,
list
)):
raise
DGLError
(
'Invalid argument edata: must be a string list but got {}.'
.
format
(
raise
DGLError
(
'Invalid argument edata: must be a string list but got {}.'
.
format
(
type
(
edata
)))
type
(
edata
)))
if
any
(
g
.
is_block
for
g
in
graphs
):
raise
DGLError
(
"Batching a block is not supported."
)
utils
.
check_all_same_device
(
graphs
,
'graphs'
)
utils
.
check_all_same_device
(
graphs
,
'graphs'
)
utils
.
check_all_same_idtype
(
graphs
,
'graphs'
)
utils
.
check_all_same_idtype
(
graphs
,
'graphs'
)
...
...
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