-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0676019
commit cc4afc6
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import torchtext | ||
|
||
torchtext.disable_torchtext_deprecation_warning() | ||
|
||
import ray | ||
|
||
from workflow import ThreadPoolWorkflowExecutor, SurveyPaperReading | ||
from models import set_llm_model, DefaultEmbedding, DEFAULT_LLM_MODEL_CONFIG | ||
from workflow.ray_executor import RayWorkflowExecutor | ||
|
||
import json | ||
import logging | ||
|
||
logging.basicConfig(level=logging.DEBUG) | ||
|
||
if __name__ == "__main__": | ||
ray.init() | ||
graph_json = "" | ||
with open("config/workflow_navigator.json") as f: | ||
graph_json = json.load(f) | ||
|
||
if graph_json: | ||
workflow_json = { | ||
"id": "test_ray", | ||
"llm_model": DEFAULT_LLM_MODEL_CONFIG, | ||
"graph": graph_json, | ||
} | ||
paper_survey_workflow = SurveyPaperReading.from_json(workflow_json) | ||
executor = RayWorkflowExecutor(workflow_json, max_workers=4) | ||
inputs = [ | ||
{"paper_file_path": "inputs/samples/graphrag.pdf"}, | ||
{"paper_file_path": "inputs/samples/huge-sigmod21.pdf"}, | ||
{"paper_file_path": "inputs/samples/relgo-sigmod25.pdf"}, | ||
] | ||
executor.execute(inputs) |