mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-01 01:51:18 +08:00
Update exp base method
This commit is contained in:
@@ -181,6 +181,28 @@ class Experiment:
|
||||
logger.info(f"No valid recorder found. Create a new recorder with name {recorder_name}.")
|
||||
return self.create_recorder(recorder_name), True
|
||||
|
||||
def _get_recorder(self, recorder_id=None, recorder_name=None):
|
||||
"""
|
||||
Get specific recorder by name or id. If it does not exist, raise ValueError
|
||||
|
||||
Parameters
|
||||
----------
|
||||
recorder_id :
|
||||
The id of recorder
|
||||
recorder_name :
|
||||
The name of recorder
|
||||
|
||||
Returns
|
||||
-------
|
||||
Recorder:
|
||||
The searched recorder
|
||||
|
||||
Raises
|
||||
------
|
||||
ValueError
|
||||
"""
|
||||
raise NotImplementedError(f"Please implement the `_get_recorder` method")
|
||||
|
||||
def list_recorders(self):
|
||||
"""
|
||||
List all the existing recorders of this experiment. Please first get the experiment instance before calling this method.
|
||||
|
||||
@@ -181,14 +181,14 @@ class ExpManager:
|
||||
|
||||
def _get_exp(self, experiment_id=None, experiment_name=None) -> Experiment:
|
||||
"""
|
||||
get specific experiment by name or id. If it does not exist, raise ValueError
|
||||
Get specific experiment by name or id. If it does not exist, raise ValueError.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
experiment_id :
|
||||
The id of experiment
|
||||
experiment_name :
|
||||
The id name experiment
|
||||
The name of experiment
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
||||
Reference in New Issue
Block a user