-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_pipeline.py
More file actions
36 lines (27 loc) · 1.23 KB
/
run_pipeline.py
File metadata and controls
36 lines (27 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import os
import glob
import asyncio
from src.orchestrator.pipeline import SemanticPrismOrchestrator
async def main():
print("✅ Core imports loaded successfully.")
target_dir = "inputs/testdocs"
files = glob.glob(os.path.join(target_dir, "*.txt")) + glob.glob(os.path.join(target_dir, "*.md"))
raw_documents = []
for path in files:
with open(path, "r", encoding="utf-8") as f:
raw_documents.append({"filename": path, "text": f.read()})
print(f"Ingested {len(raw_documents)} logic documents natively.")
if not raw_documents:
print("⚠️ No documents discovered in inputs/reports directory. Exiting.")
return
# Instantiate the Master Pipeline Orchestrator
orchestrator = SemanticPrismOrchestrator("config.yaml")
print("✅ Master Pipeline Orchestrator initialized.")
# Execute the structured knowledge pipeline
file_path = await orchestrator.execute_knowledge_pipeline(raw_documents)
if file_path:
print(f"🎉 Pipeline Complete! Final logical schema outputs synthesized securely to: {file_path}")
else:
print("⚠️ Pipeline ended early or failed to synthesize schemas.")
if __name__ == "__main__":
asyncio.run(main())