fixed ruff format of csv path

(cherry picked from commit b12b693a81)
This commit is contained in:
anouarbm 2025-11-02 11:46:22 +01:00 committed by Raphaël MANSUY
parent 949bfc4228
commit ccdd3c2786

View file

@ -282,7 +282,9 @@ class RAGEvaluator:
- ragas_score: Overall RAGAS score (0-1) - ragas_score: Overall RAGAS score (0-1)
- timestamp: When evaluation was run - timestamp: When evaluation was run
""" """
csv_path = self.results_dir / f"results_{datetime.now().strftime('%Y%m%d_%H%M%S')}.csv" csv_path = (
self.results_dir / f"results_{datetime.now().strftime('%Y%m%d_%H%M%S')}.csv"
)
with open(csv_path, "w", newline="", encoding="utf-8") as f: with open(csv_path, "w", newline="", encoding="utf-8") as f:
fieldnames = [ fieldnames = [
@ -339,7 +341,10 @@ class RAGEvaluator:
} }
# Save JSON results # Save JSON results
json_path = self.results_dir / f"results_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json" json_path = (
self.results_dir
/ f"results_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json"
)
with open(json_path, "w") as f: with open(json_path, "w") as f:
json.dump(summary, f, indent=2) json.dump(summary, f, indent=2)
print(f"✅ JSON results saved to: {json_path}") print(f"✅ JSON results saved to: {json_path}")