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 errors when SignalRecord is not called before SigAna/PortAna #345

Merged
merged 7 commits into from
Mar 17, 2021
Merged

Fix errors when SignalRecord is not called before SigAna/PortAna #345

merged 7 commits into from
Mar 17, 2021

Conversation

D-X-Y
Copy link
Contributor

@D-X-Y D-X-Y commented Mar 16, 2021

Fix errors when SignalRecord is not called before SigAna/PortAna and add unit tests.

Motivation and Context

  • If SignalRecord's generate function is not called before SigAna/PortAna's generate, it will raise an error.
  • Add a unit test for it.
  • Add SignalMseRecord to compute the MSE metric.

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.

Screenshots of Test Results (if appropriate):

image

Types of changes

  • Fix bugs
  • Add features

def generate(self, **kwargs):
try:
self.check(parent=True)
except:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify the specific error type to avoid unexpected outcomes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, added :)

self.check(parent=True) # "Make sure the parent process is completed and store the data properly."
try:
self.check(parent=True) # "Make sure the parent process is completed and store the data properly."
except:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, added :)

@D-X-Y D-X-Y requested a review from Derek-Wds March 16, 2021 09:03
@you-n-g
Copy link
Collaborator

you-n-g commented Mar 16, 2021

@D-X-Y LGTM. It's great

Copy link
Contributor

@Derek-Wds Derek-Wds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks~

@D-X-Y
Copy link
Contributor Author

D-X-Y commented Mar 16, 2021

Thanks for your instant review :) @you-n-g would you mind helping merge?

@D-X-Y D-X-Y requested a review from Derek-Wds March 16, 2021 12:55
Copy link
Contributor

@Derek-Wds Derek-Wds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@you-n-g you-n-g merged commit aa552fd into microsoft:main Mar 17, 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.

3 participants