Skip to content

Bug fix: ClientProvider not set connection to calendar and instrument provider when initializing.#500

Merged
you-n-g merged 2 commits intomicrosoft:mainfrom
chaosddp:main
Jul 13, 2021
Merged

Bug fix: ClientProvider not set connection to calendar and instrument provider when initializing.#500
you-n-g merged 2 commits intomicrosoft:mainfrom
chaosddp:main

Conversation

@chaosddp
Copy link
Contributor

@chaosddp chaosddp commented Jul 7, 2021

The isinstance checking for client calendar and client instrument provider are not correct, here is a little patch to fix it.

And fix the dump script to drop duplicates.

Description

When use qlib online mode, with following configuration (from qlib-server document), will cause exception "qlib/data/data.py", line 817, in list_instruments. AttributeError: 'NoneType' object has no attribute 'send_request'".

calendar_provider:
  class: LocalCalendarProvider
  kwargs:
    remote: True

feature_provider:
  class: LocalFeatureProvider
  kwargs:
    remote: True

instrument_provider: ClientInstrumentProvider

expression_provider: LocalExpressionProvider

dataset_provider: ClientDatasetProvider

provider: ClientProvider

expression_cache: null
dataset_cache: null
calendar_cache: null

Motivation and Context

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

@chaosddp chaosddp changed the title Bug fix: ClientProvider cannot set connection to calendar and instrument provider when initializing. Bug fix: ClientProvider not set connection to calendar and instrument provider when initializing. Jul 7, 2021
@you-n-g
Copy link
Collaborator

you-n-g commented Jul 13, 2021

@chaosddp

It looks great!
Thanks so much!

@you-n-g you-n-g merged commit a8974ce into microsoft:main Jul 13, 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.

2 participants