1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-19 10:24:35 +08:00

support empty benchmark

Empty benchmark could accelerate the learning process
This commit is contained in:
Young
2021-07-26 06:14:57 +00:00
parent 9bf8c999e6
commit bdebe12cf2
6 changed files with 45 additions and 39 deletions

View File

@@ -80,11 +80,12 @@ class Report:
def init_bench(self, freq=None, benchmark_config=None):
if freq is not None:
self.freq = freq
if benchmark_config is not None:
self.benchmark_config = benchmark_config
self.benchmark_config = benchmark_config
self.bench = self._cal_benchmark(self.benchmark_config, self.freq)
def _cal_benchmark(self, benchmark_config, freq):
if benchmark_config is None:
return None
benchmark = benchmark_config.get("benchmark", CSI300_BENCH)
if benchmark is None:
return None