Spaces:
Runtime error
Runtime error
File size: 1,689 Bytes
8c0b652 |
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
#!/usr/bin/env python3
"""
Simple runner for financial context length performance tests.
"""
import asyncio
import sys
from pathlib import Path
# Add the parent directory to the path to import the test module
sys.path.append(str(Path(__file__).parent.parent))
from context_performance_tests import FinancialContextTester
async def main():
"""Run the context length performance tests."""
print("π§ͺ Financial AI Context Length Performance Testing")
print("=" * 50)
# Initialize tester
tester = FinancialContextTester()
try:
# Run tests
analysis = await tester.run_context_length_tests()
# Generate report
report = tester.generate_report(analysis)
# Save report
report_path = Path("testing/results/context_performance_report.md")
report_path.parent.mkdir(parents=True, exist_ok=True)
with open(report_path, 'w') as f:
f.write(report)
print(f"\nβ
Tests completed successfully!")
print(f"π Report saved to: {report_path}")
# Print key insights
print(f"\nπ Key Insights:")
print(f" β’ 128K context provides {analysis['summary']['average_business_value']:.1%} business value")
print(f" β’ Average response time: {analysis['summary']['average_response_time']:.2f}s")
print(f" β’ Analysis completeness: {analysis['summary']['average_completeness']:.1%}")
except Exception as e:
print(f"β Test execution failed: {e}")
return 1
return 0
if __name__ == "__main__":
exit_code = asyncio.run(main())
sys.exit(exit_code)
|