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

pylint code refine & Fix nested example (#848)

* refine code by CI

* fix argument error

* fix nested eample
This commit is contained in:
you-n-g
2022-01-14 09:09:21 +08:00
committed by GitHub
parent c3996955ef
commit d0113ea7df
26 changed files with 65 additions and 68 deletions

View File

@@ -416,6 +416,11 @@ class QlibRecorder:
# Case 5
recorder = R.get_recorder(recorder_id='2e7a4efd66574fa49039e00ffaefa99d', experiment_name='test')
Here are some things users may concern
- Q: What recorder will it return if multiple recorder meets the query (e.g. query with experiment_name)
- A: If mlflow backend is used, then the recorder with the latest `start_time` will be returned. Because MLflow's `search_runs` function guarantee it
Parameters
----------
recorder_id : str

View File

@@ -287,6 +287,9 @@ class MLflowExperiment(Experiment):
"""
Method for getting or creating a recorder. It will try to first get a valid recorder, if exception occurs, it will
raise errors.
Quoting docs of search_runs from MLflow
> The default ordering is to sort by start_time DESC, then run_id.
"""
assert (
recorder_id is not None or recorder_name is not None

View File

@@ -355,7 +355,7 @@ class MLflowRecorder(Recorder):
shutil.rmtree(Path(path).absolute().parent)
return data
except Exception as e:
raise LoadObjectError(message=str(e))
raise LoadObjectError(str(e))
@AsyncCaller.async_dec(ac_attr="async_log")
def log_params(self, **kwargs):