osnHQ / ethosai

Automate AI testing & ensure model trustworthiness
https://ethosai.one
GNU General Public License v3.0
10 stars 7 forks source link

Optimized Evaluation of CSV file #72

Closed Priyanshi1908 closed 1 hour ago

Priyanshi1908 commented 2 hours ago

This PR optimizes the evaluation process by applying batch processing and concurrency techniques to significantly improve performance. Incorporated p-limit for managing concurrency and refactored the evaluation functions to handle multiple requests more efficiently.

Key Changes:

  1. Batch Processing: Refactored evaluation functions to handle multiple questions concurrently instead of sequentially.

  2. Concurrency with p-limit: Installed and integrated p-limit to control the concurrency of API calls, preventing overload while still optimizing request throughput.

  3. Improved Evaluation Flow: Optimized both the question evaluation and report generation steps to reduce latency and handle bulk data more effectively.