Skip to content

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

Merged
you-n-g merged 7 commits intomicrosoft:mainfrom
D-X-Y:main
Mar 17, 2021
Merged

Fix errors when SignalRecord is not called before SigAna/PortAna#345
you-n-g merged 7 commits intomicrosoft:mainfrom
D-X-Y:main

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
you-n-g pushed a commit to you-n-g/qlib that referenced this pull request Aug 16, 2025
gaogen123 pushed a commit to gaogen123/qlib that referenced this pull request Sep 13, 2025
Fix errors when SignalRecord is not called before SigAna/PortAna
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