imbajin commented on code in PR #370:
URL: https://github.com/apache/hugegraph-ai/pull/370#discussion_r3562075148
##########
hugegraph-llm/src/hugegraph_llm/flows/graph_extract.py:
##########
@@ -53,6 +54,13 @@ def prepare(
raise ValueError("split_type must be document, paragraph, or
sentence")
prepared_input.split_type = split_type
+ try:
+ graph_extract_max_workers = int(graph_extract_max_workers)
+ except (TypeError, ValueError) as exc:
+ raise ValueError("graph_extract_max_workers must be a positive
integer") from exc
+ if graph_extract_max_workers < 1:
Review Comment:
This only rejects values below 1, while the UI advertises a maximum of 8.
Programmatic callers can pass a much larger graph_extract_max_workers value,
and PropertyGraphExtract will create up to min(max_workers, len(chunks))
threads. Please enforce the same backend cap here, or in a shared validator
used by both this flow and graph_index_utils, so the concurrency limit stays
bounded outside the Gradio slider path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]