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

Don't disable existing logger when initializing qlib. #1339

Merged
merged 3 commits into from
Nov 10, 2022
Merged

Don't disable existing logger when initializing qlib. #1339

merged 3 commits into from
Nov 10, 2022

Conversation

jingedawang
Copy link
Contributor

Description

Add following config line to logging_config to prevent disabling the existing logger.

"disable_existing_loggers": False

Without this line, loggers from other code will be disabled.

Motivation and Context

When using qlib with other services and apps, loggers from other services will be disabled after qlib initialization. This is not friendly to collaborate with other packages.

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

@jingedawang
Copy link
Contributor Author

Hi @you-n-g , could you help review this PR? This could help qlib work with other packages.

qlib/config.py Show resolved Hide resolved
@you-n-g
Copy link
Collaborator

you-n-g commented Nov 10, 2022

LGTM.
Thanks so much !

@you-n-g you-n-g merged commit 49a5bcc into microsoft:main Nov 10, 2022
@you-n-g you-n-g added the enhancement New feature or request label Dec 9, 2022
qianyun210603 pushed a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
* Don't disable existing logger when initializing qlib.

* Add comma in the end of the config line.

* Add comment to the added config.

Co-authored-by: Jinge Wang <jingewang@microsoft.com>
qianyun210603 pushed a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
* Don't disable existing logger when initializing qlib.

* Add comma in the end of the config line.

* Add comment to the added config.

Co-authored-by: Jinge Wang <jingewang@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants