Spaces:
Sleeping
Sleeping
File size: 1,331 Bytes
a309487 |
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 |
import pandas as pd
from benchmark_runner import BenchmarkRunner
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
from backend.core.orchestrator import Orchestrator
# Load datasets
datasets = {
"titanic": (pd.read_csv(os.path.join(os.path.dirname(__file__), '..', '..', 'datasets', 'real_world', 'titanic.csv')), "Survived"),
"credit_default": (pd.read_csv(os.path.join(os.path.dirname(__file__), '..', '..', 'datasets', 'real_world', 'credit_default.csv')), "default.payment.next.month"),
"house_prices": (pd.read_csv(os.path.join(os.path.dirname(__file__), '..', '..', 'datasets', 'real_world', 'house_prices.csv')), "Price"),
"telecom_churn": (pd.read_csv(os.path.join(os.path.dirname(__file__), '..', '..', 'datasets', 'real_world', 'telecom_churn.csv')), "Churn"),
"news_classification": (pd.read_csv(os.path.join(os.path.dirname(__file__), '..', '..', 'datasets', 'real_world', 'news_classification.csv')), "label"),
}
orchestrator = Orchestrator()
runner = BenchmarkRunner()
results = runner.run(orchestrator, datasets)
print("Benchmark Results:")
for result in results:
print(result)
# Save results to file
with open("experiments/benchmark_results.json", "w") as f:
import json
json.dump(results, f, indent=4)
|