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
7b4c8c77
Unverified
Commit
7b4c8c77
authored
Feb 28, 2024
by
Mingbang Wang
Committed by
GitHub
Feb 28, 2024
Browse files
[GraphBolt] Update `_init_all_nodes_set` (#7168)
parent
1e589e85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
python/dgl/graphbolt/impl/ondisk_dataset.py
python/dgl/graphbolt/impl/ondisk_dataset.py
+9
-2
No files found.
python/dgl/graphbolt/impl/ondisk_dataset.py
View file @
7b4c8c77
...
@@ -828,11 +828,18 @@ class OnDiskDataset(Dataset):
...
@@ -828,11 +828,18 @@ class OnDiskDataset(Dataset):
)
)
return
None
return
None
num_nodes
=
graph
.
num_nodes
num_nodes
=
graph
.
num_nodes
dtype
=
graph
.
indices
.
dtype
if
isinstance
(
num_nodes
,
int
):
if
isinstance
(
num_nodes
,
int
):
return
ItemSet
(
num_nodes
,
names
=
"seed_nodes"
)
return
ItemSet
(
torch
.
tensor
(
num_nodes
,
dtype
=
dtype
),
names
=
"seed_nodes"
,
)
else
:
else
:
data
=
{
data
=
{
node_type
:
ItemSet
(
num_node
,
names
=
"seed_nodes"
)
node_type
:
ItemSet
(
torch
.
tensor
(
num_node
,
dtype
=
dtype
),
names
=
"seed_nodes"
,
)
for
node_type
,
num_node
in
num_nodes
.
items
()
for
node_type
,
num_node
in
num_nodes
.
items
()
}
}
return
ItemSetDict
(
data
)
return
ItemSetDict
(
data
)
...
...
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