Unverified Commit fe8a8fc0 authored by keli-wen's avatar keli-wen Committed by GitHub
Browse files

[Graphbolt] Modify `preprocess_ondisk_dataset` function. (#6017)

fix str
parent b26da252
......@@ -137,9 +137,9 @@ def preprocess_ondisk_dataset(input_config_path: str) -> str:
):
# Always save the feature in numpy format.
out_feature["format"] = "numpy"
out_feature["path"] = processed_dir_prefix / feature[
"path"
].replace("pt", "npy")
out_feature["path"] = str(
processed_dir_prefix / feature["path"].replace("pt", "npy")
)
if feature["format"] == "numpy":
# If the original format is numpy, just copy the file.
......@@ -176,10 +176,9 @@ def preprocess_ondisk_dataset(input_config_path: str) -> str:
):
# Always save the feature in numpy format.
output_set_per_type["format"] = "numpy"
output_set_per_type[
"path"
] = processed_dir_prefix / input_set_per_type["path"].replace(
"pt", "npy"
output_set_per_type["path"] = str(
processed_dir_prefix
/ input_set_per_type["path"].replace("pt", "npy")
)
if input_set_per_type["format"] == "numpy":
# If the original format is numpy, just copy the file.
......@@ -209,7 +208,7 @@ def preprocess_ondisk_dataset(input_config_path: str) -> str:
with open(output_config_path, "w") as f:
yaml.dump(output_config, f)
print("Finish preprocessing the on-disk dataset.")
return output_config_path
return str(output_config_path)
class OnDiskDataset(Dataset):
......
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