1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-06 04:20:57 +08:00

Add MultiSegRecord in contrib.workflow and decouple its tests from test_all_pipeline

This commit is contained in:
D-X-Y
2021-03-28 00:33:59 -07:00
parent 0387eaf7ab
commit 9d04ae4676
7 changed files with 171 additions and 27 deletions

View File

@@ -159,7 +159,10 @@ class Experiment:
if create:
recorder, is_new = self._get_or_create_rec(recorder_id=recorder_id, recorder_name=recorder_name)
else:
recorder, is_new = self._get_recorder(recorder_id=recorder_id, recorder_name=recorder_name), False
recorder, is_new = (
self._get_recorder(recorder_id=recorder_id, recorder_name=recorder_name),
False,
)
if is_new:
self.active_recorder = recorder
# start the recorder
@@ -174,7 +177,10 @@ class Experiment:
try:
if recorder_id is None and recorder_name is None:
recorder_name = self._default_rec_name
return self._get_recorder(recorder_id=recorder_id, recorder_name=recorder_name), False
return (
self._get_recorder(recorder_id=recorder_id, recorder_name=recorder_name),
False,
)
except ValueError:
if recorder_name is None:
recorder_name = self._default_rec_name