Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions gigl/src/data_preprocessor/data_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,13 @@ def __build_data_reference_str(references: Iterable[DataReference]) -> str:
edge_ref_to_preprocessing_spec
)

if num_dataflow_jobs == 0:
logger.info("No data references to preprocess; skipping Dataflow.")
return PreprocessedMetadataReferences(
node_data=node_refs_and_results,
edge_data=edge_refs_and_results,
)

with concurrent.futures.ThreadPoolExecutor(
max_workers=num_dataflow_jobs
) as executor:
Expand Down
4 changes: 2 additions & 2 deletions gigl/src/data_preprocessor/lib/enumerate/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def __enumerate_all_node_references(
f"Launch {len(node_data_references)} node enumeration jobs in parallel."
)
with concurrent.futures.ThreadPoolExecutor(
max_workers=len(node_data_references)
max_workers=max(1, len(node_data_references))
) as executor:
futures: list[concurrent.futures.Future] = list()
for node_data_ref in node_data_references:
Expand All @@ -278,7 +278,7 @@ def __enumerate_all_edge_references(
f"Launch {len(edge_data_references)} edge enumeration jobs in parallel."
)
with concurrent.futures.ThreadPoolExecutor(
max_workers=len(edge_data_references)
max_workers=max(1, len(edge_data_references))
) as executor:
futures: list[concurrent.futures.Future] = list()
for edge_data_ref in edge_data_references:
Expand Down