mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-10 22:36:55 +08:00
Fix some warnings in log.py. (#805)
* Fix some warnings in log.py. * Fix typo and using black format. * Fix black. * Rename dict_ to attrs
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
About the configs
|
||||
=================
|
||||
|
||||
The config will based on _default_config.
|
||||
The config will be based on _default_config.
|
||||
Two modes are supported
|
||||
- client
|
||||
- server
|
||||
@@ -28,7 +28,7 @@ if TYPE_CHECKING:
|
||||
|
||||
class Config:
|
||||
def __init__(self, default_conf):
|
||||
self.__dict__["_default_config"] = copy.deepcopy(default_conf) # avoiding conflictions with __getattr__
|
||||
self.__dict__["_default_config"] = copy.deepcopy(default_conf) # avoiding conflicts with __getattr__
|
||||
self.reset()
|
||||
|
||||
def __getitem__(self, key):
|
||||
@@ -271,7 +271,11 @@ class QlibConfig(Config):
|
||||
self._registered = False
|
||||
|
||||
class DataPathManager:
|
||||
def __init__(self, provider_uri: Union[str, Path, dict], mount_path: Union[str, Path, dict]):
|
||||
def __init__(
|
||||
self,
|
||||
provider_uri: Union[str, Path, dict],
|
||||
mount_path: Union[str, Path, dict],
|
||||
):
|
||||
self.provider_uri = provider_uri
|
||||
self.mount_path = mount_path
|
||||
|
||||
@@ -360,10 +364,10 @@ class QlibConfig(Config):
|
||||
"""
|
||||
configure qlib based on the input parameters
|
||||
|
||||
The configure will act like a dictionary.
|
||||
The configuration will act like a dictionary.
|
||||
|
||||
Normally, it literally replace the value according to the keys.
|
||||
However, sometimes it is hard for users to set the config when the configure is nested and complicated
|
||||
Normally, it literally is replaced the value according to the keys.
|
||||
However, sometimes it is hard for users to set the config when the configuration is nested and complicated
|
||||
|
||||
So this API provides some special parameters for users to set the keys in a more convenient way.
|
||||
- region: REG_CN, REG_US
|
||||
|
||||
Reference in New Issue
Block a user