mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-15 00:36:55 +08:00
Fix typos and comments. (#815)
* Fix typos and comments. * Add comma before and.
This commit is contained in:
@@ -19,11 +19,17 @@ def init(default_conf="client", **kwargs):
|
|||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
|
default_conf: str
|
||||||
|
the default value is client. Accepted values: client/server.
|
||||||
**kwargs :
|
**kwargs :
|
||||||
clear_mem_cache: str
|
clear_mem_cache: str
|
||||||
the default value is True;
|
the default value is True;
|
||||||
Will the memory cache be clear.
|
Will the memory cache be clear.
|
||||||
It is often used to improve performance when init will be called for multiple times
|
It is often used to improve performance when init will be called for multiple times
|
||||||
|
skip_if_reg: bool: str
|
||||||
|
the default value is True;
|
||||||
|
When using the recorder, skip_if_reg can set to True to avoid loss of recorder.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from .config import C
|
from .config import C
|
||||||
from .data.cache import H
|
from .data.cache import H
|
||||||
@@ -180,7 +186,7 @@ def get_project_path(config_name="config.yaml", cur_path: Union[Path, str, None]
|
|||||||
- There is a file named `config.yaml` in qlib.
|
- There is a file named `config.yaml` in qlib.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
If your project file system stucuture follows such a pattern
|
If your project file system structure follows such a pattern
|
||||||
|
|
||||||
<project_path>/
|
<project_path>/
|
||||||
- config.yaml
|
- config.yaml
|
||||||
@@ -225,7 +231,7 @@ def auto_init(**kwargs):
|
|||||||
Here are two examples of the configuration
|
Here are two examples of the configuration
|
||||||
|
|
||||||
Example 1)
|
Example 1)
|
||||||
If you want create a new project-specific config based on a shared configure, you can use `conf_type: ref`
|
If you want to create a new project-specific config based on a shared configure, you can use `conf_type: ref`
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
@@ -241,7 +247,7 @@ def auto_init(**kwargs):
|
|||||||
default_exp_name: "Experiment"
|
default_exp_name: "Experiment"
|
||||||
|
|
||||||
Example 2)
|
Example 2)
|
||||||
If you want to create simple a stand alone config, you can use following config(a.k.a `conf_type: origin`)
|
If you want to create simple a standalone config, you can use following config(a.k.a. `conf_type: origin`)
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@@ -271,8 +277,8 @@ def auto_init(**kwargs):
|
|||||||
init_from_yaml_conf(conf_pp, **kwargs)
|
init_from_yaml_conf(conf_pp, **kwargs)
|
||||||
elif conf_type == "ref":
|
elif conf_type == "ref":
|
||||||
# This config type will be more convenient in following scenario
|
# This config type will be more convenient in following scenario
|
||||||
# - There is a shared configure file and you don't want to edit it inplace.
|
# - There is a shared configure file, and you don't want to edit it inplace.
|
||||||
# - The shared configure may be updated later and you don't want to copy it.
|
# - The shared configure may be updated later, and you don't want to copy it.
|
||||||
# - You have some customized config.
|
# - You have some customized config.
|
||||||
qlib_conf_path = conf.get("qlib_cfg", None)
|
qlib_conf_path = conf.get("qlib_cfg", None)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user