2024-06-14 12:59:44 +08:00
|
|
|
from dataclasses import field
|
|
|
|
|
from pathlib import Path
|
2024-06-28 11:45:23 +08:00
|
|
|
from typing import Optional
|
2024-06-14 12:59:44 +08:00
|
|
|
|
2024-11-25 16:27:34 +08:00
|
|
|
from rdagent.core.conf import ExtendedBaseSettings
|
2024-06-14 12:59:44 +08:00
|
|
|
|
2024-08-06 09:29:22 +08:00
|
|
|
DIRNAME = Path("./")
|
2024-06-14 12:59:44 +08:00
|
|
|
|
|
|
|
|
|
2024-11-25 16:27:34 +08:00
|
|
|
class BenchmarkSettings(ExtendedBaseSettings):
|
2024-07-25 18:22:57 +08:00
|
|
|
class Config:
|
2024-08-06 09:29:22 +08:00
|
|
|
env_prefix = "BENCHMARK_"
|
|
|
|
|
"""Use `BENCHMARK_` as prefix for environment variables"""
|
2024-07-25 18:22:57 +08:00
|
|
|
|
2024-06-27 09:39:17 +01:00
|
|
|
bench_data_path: Path = DIRNAME / "example.json"
|
2024-08-06 09:29:22 +08:00
|
|
|
"""data for benchmark"""
|
2024-06-14 12:59:44 +08:00
|
|
|
|
2024-06-27 09:39:17 +01:00
|
|
|
bench_test_round: int = 10
|
2024-08-06 09:29:22 +08:00
|
|
|
"""how many rounds to run, each round may cost 10 minutes"""
|
|
|
|
|
|
|
|
|
|
bench_test_case_n: Optional[int] = None
|
|
|
|
|
"""how many test cases to run; If not given, all test cases will be run"""
|
2024-06-14 12:59:44 +08:00
|
|
|
|
2024-11-26 12:02:09 +08:00
|
|
|
bench_method_cls: str = "rdagent.components.coder.factor_coder.FactorCoSTEER"
|
2024-08-06 09:29:22 +08:00
|
|
|
"""method to be used for test cases"""
|
|
|
|
|
|
2024-06-14 12:59:44 +08:00
|
|
|
bench_method_extra_kwargs: dict = field(
|
|
|
|
|
default_factory=dict,
|
2024-08-06 09:29:22 +08:00
|
|
|
)
|
|
|
|
|
"""extra kwargs for the method to be tested except the task list"""
|
2024-06-14 12:59:44 +08:00
|
|
|
|
2024-06-28 11:45:23 +08:00
|
|
|
bench_result_path: Path = DIRNAME / "result"
|
2024-08-06 09:29:22 +08:00
|
|
|
"""result save path"""
|