Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix collector doc #272

Merged
merged 2 commits into from Mar 3, 2021
Merged

Conversation

ChengYen-Tang
Copy link
Contributor

Description

修正文件中的一些錯字

Motivation and Context

如果 qlib.init(provider_uri=provider_uri, region="CN") 中的 region 使用大寫,會出現以下錯誤

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-3-c309f40f6ae3> in <module>
      7     from get_data import GetData
      8     GetData().qlib_data(target_dir=provider_uri, region="CN")
----> 9 qlib.init(provider_uri=provider_uri, region="CN")

~/.local/lib/python3.8/site-packages/pyqlib-0.6.3.99-py3.8-linux-x86_64.egg/qlib/__init__.py in init(default_conf, **kwargs)
     24     logger = get_module_logger("Initialization", level=logging.INFO)
     25 
---> 26     C.set(default_conf, **kwargs)
     27 
     28     # check path if server/local

~/.local/lib/python3.8/site-packages/pyqlib-0.6.3.99-py3.8-linux-x86_64.egg/qlib/config.py in set(self, default_conf, **kwargs)
    277 
    278         self.set_mode(default_conf)
--> 279         self.set_region(kwargs.get("region", self["region"] if "region" in self else REG_CN))
    280 
    281         for k, v in kwargs.items():

~/.local/lib/python3.8/site-packages/pyqlib-0.6.3.99-py3.8-linux-x86_64.egg/qlib/config.py in set_region(self, region)
    230     def set_region(self, region):
    231         # raise KeyError
--> 232         self.update(_default_region_config[region])
    233 
    234     def resolve_path(self):

KeyError: 'CN'

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@ghost
Copy link

ghost commented Feb 16, 2021

CLA assistant check
All CLA requirements met.

@you-n-g
Copy link
Collaborator

you-n-g commented Mar 3, 2021

@ChengYen-Tang
It looks great! Thansk for your PR.

@you-n-g you-n-g merged commit b8cf229 into microsoft:main Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants