diff --git a/qlib/workflow/exp.py b/qlib/workflow/exp.py index 12a8fc057..5ed4362de 100644 --- a/qlib/workflow/exp.py +++ b/qlib/workflow/exp.py @@ -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. diff --git a/qlib/workflow/expm.py b/qlib/workflow/expm.py index 6bff9fc53..95cad4c6e 100644 --- a/qlib/workflow/expm.py +++ b/qlib/workflow/expm.py @@ -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 -------