mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
43cb4a564b
* Commit init framework * Co-authored-by: Yuante Li (FESCO Adecco Human Resources) <v-yuanteli@microsoft.com> Co-authored-by: XianBW <XianBW@users.noreply.github.com> * add an import * refine the whole framework * benchmark related framework * fix black and isort errors * move requirements to folder * fix black again --------- Co-authored-by: Young <afe.young@gmail.com> Co-authored-by: xuyang1 <xuyang1@microsoft.com>
29 lines
838 B
Python
29 lines
838 B
Python
from rdagent.components.benchmark.conf import BenchmarkSettings
|
|
from rdagent.components.benchmark.eval_method import FactorImplementEval
|
|
from rdagent.core.utils import import_class
|
|
from rdagent.scenarios.qlib.factor_task_loader.json_loader import (
|
|
FactorTestCaseLoaderFromJsonFile,
|
|
)
|
|
|
|
# 1.read the settings
|
|
bs = BenchmarkSettings()
|
|
|
|
# 2.read and prepare the eval_data
|
|
test_cases = FactorTestCaseLoaderFromJsonFile().load(bs.bench_data_path)
|
|
|
|
# 3.declare the method to be tested and pass the arguments.
|
|
|
|
method_cls = import_class(bs.bench_method_cls)
|
|
generate_method = method_cls()
|
|
|
|
# 4.declare the eval method and pass the arguments.
|
|
eval_method = FactorImplementEval(
|
|
method=generate_method,
|
|
test_cases=test_cases,
|
|
catch_eval_except=True,
|
|
test_round=bs.bench_test_round,
|
|
)
|
|
|
|
# 5.run the eval
|
|
res = eval_method.eval()
|