1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-15 00:36:55 +08:00

Update R wrapper logic

This commit is contained in:
Jactus
2021-06-16 12:28:20 +08:00
parent 64582e9d46
commit 0fe8b281ba

View File

@@ -533,6 +533,8 @@ class RecorderWrapper(Wrapper):
def register(self, provider): def register(self, provider):
if self._provider is not None: if self._provider is not None:
expm = getattr(self._provider, "exp_manager")
if expm.active_experiment is not None:
raise RecorderInitializationError( raise RecorderInitializationError(
"Please don't reinitialize Qlib if QlibRecorder is already acivated. Otherwise, the experiment stored location will be modified." "Please don't reinitialize Qlib if QlibRecorder is already acivated. Otherwise, the experiment stored location will be modified."
) )