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
4b295d60
Unverified
Commit
4b295d60
authored
Jan 11, 2022
by
Rhett Ying
Committed by
GitHub
Jan 11, 2022
Browse files
[FIX] fix compute/test_data.py::test_csvdataset (#3643)
parent
6dce19d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tests/compute/test_data.py
tests/compute/test_data.py
+3
-3
No files found.
tests/compute/test_data.py
View file @
4b295d60
...
...
@@ -716,7 +716,7 @@ def _test_DGLCSVDataset_single():
# remove original node data file to verify reload from cached files
os
.
remove
(
nodes_csv_path_0
)
assert
not
os
.
path
.
exists
(
nodes_csv_path_0
)
csv_dataset
=
data
.
DGLCSVDataset
(
csv_dataset
=
csv_ds
.
DGLCSVDataset
(
test_dir
,
force_reload
=
force_reload
)
assert
len
(
csv_dataset
)
==
1
g
=
csv_dataset
[
0
]
...
...
@@ -799,7 +799,7 @@ def _test_DGLCSVDataset_multiple():
# remove original node data file to verify reload from cached files
os
.
remove
(
nodes_csv_path_0
)
assert
not
os
.
path
.
exists
(
nodes_csv_path_0
)
csv_dataset
=
data
.
DGLCSVDataset
(
csv_dataset
=
csv_ds
.
DGLCSVDataset
(
test_dir
,
force_reload
=
force_reload
)
assert
len
(
csv_dataset
)
==
num_graphs
assert
csv_dataset
.
has_cache
()
...
...
@@ -885,7 +885,7 @@ def _test_DGLCSVDataset_customized_data_parser():
data
[
header
]
=
dt
return
data
# load CSVDataset with customized node/edge/graph_data_parser
csv_dataset
=
data
.
DGLCSVDataset
(
csv_dataset
=
csv_ds
.
DGLCSVDataset
(
test_dir
,
node_data_parser
=
{
'user'
:
CustDataParser
()},
edge_data_parser
=
{(
'user'
,
'like'
,
'item'
):
CustDataParser
()},
graph_data_parser
=
CustDataParser
())
assert
len
(
csv_dataset
)
==
num_graphs
assert
len
(
csv_dataset
.
data
)
==
1
...
...
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