Skip to content

Commit

Permalink
Update R wrapper logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek-Wds committed Jun 16, 2021
1 parent 64582e9 commit 0fe8b28
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions qlib/workflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,11 @@ class RecorderWrapper(Wrapper):

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


Expand Down

0 comments on commit 0fe8b28

Please sign in to comment.