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

Update index_data.py for datatype conversion and alignment #1813

Merged
merged 4 commits into from
Jun 24, 2024

Conversation

taozhiwang
Copy link
Contributor

Description

Hi,

Here I change index_data.py for converting time in datetime64 into the same precision with user data. This helps users avoid query failures due to precision issues.

Datetype detection is performed during initialization to avoid inconsistencies in the format of user data. This may have some impact on efficiency.

Changed files:

  1. index_data.py change __init__ under Index for the initial alignment test, also change _convert_type for detecting data type and convert precision
  2. test_index_data.py test above changes
  3. shrink.py pre-commit auto-correction

Motivation and Context

issue 1806

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:
image
  1. Your own tests:
image

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@github-actions github-actions bot added the waiting for triage Cannot auto-triage, wait for triage. label Jun 22, 2024
@taozhiwang
Copy link
Contributor Author

@microsoft-github-policy-service agree

qlib/utils/index_data.py Outdated Show resolved Hide resolved
qlib/utils/index_data.py Outdated Show resolved Hide resolved
@you-n-g you-n-g merged commit cde8020 into microsoft:main Jun 24, 2024
32 checks passed
@you-n-g
Copy link
Collaborator

you-n-g commented Jun 24, 2024

Thanks for your great efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for triage Cannot auto-triage, wait for triage.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants