Moving to relative paths

This commit is contained in:
DebarghaG
2025-10-02 17:55:59 -04:00
parent dc7f9eeeb4
commit c3ed8691d9

View File

@@ -9,10 +9,11 @@ import logging
import sys import sys
import time import time
from datetime import datetime from datetime import datetime
from pathlib import Path
from typing import Any from typing import Any
# Add parent directory to path # Add parent directory to path
sys.path.insert(0, "/users/PAS2271/debargha/proofofthought") sys.path.insert(0, str(Path(__file__).parent.parent.absolute()))
from examples.azure_config import get_client_config from examples.azure_config import get_client_config
from z3dsl.reasoning import ProofOfThought from z3dsl.reasoning import ProofOfThought
@@ -182,13 +183,14 @@ def save_results(results: list[dict[str, Any]], output_path: str) -> None:
def main() -> None: def main() -> None:
"""Main benchmark execution.""" """Main benchmark execution."""
dataset_path = "/users/PAS2271/debargha/proofofthought/strategyQA_train.json" script_dir = Path(__file__).parent
output_path = "/users/PAS2271/debargha/proofofthought/strategyqa_results.json" dataset_path = script_dir / "strategyQA_train.json"
output_path = script_dir / "strategyqa_results.json"
num_questions = 100 num_questions = 100
# Load questions # Load questions
print("Loading StrategyQA questions...") print("Loading StrategyQA questions...")
questions = load_strategyqa_questions(dataset_path, num_questions) questions = load_strategyqa_questions(str(dataset_path), num_questions)
print(f"Loaded {len(questions)} questions") print(f"Loaded {len(questions)} questions")
# Initialize ProofOfThought with Azure GPT-5 # Initialize ProofOfThought with Azure GPT-5
@@ -207,7 +209,7 @@ def main() -> None:
print(f"Total execution time: {total_time/60:.1f} minutes\n") print(f"Total execution time: {total_time/60:.1f} minutes\n")
# Save results # Save results
save_results(results, output_path) save_results(results, str(output_path))
if __name__ == "__main__": if __name__ == "__main__":