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

add default protocol_version #677

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

zhupr
Copy link
Collaborator

@zhupr zhupr commented Nov 8, 2021

Description

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

@zhupr zhupr requested a review from you-n-g November 8, 2021 16:02
@@ -85,7 +86,7 @@ def to_pickle(self, path: Union[Path, str], dump_all: bool = None, exclude: list
"""
self.config(dump_all=dump_all, exclude=exclude)
with Path(path).open("wb") as f:
self.get_backend().dump(self, f)
self.get_backend().dump(self, f, protocol=C.dump_protocol_version)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The backend may not be a pickle.
Maybe you can add Serializable.dump_kwargs for dumping and encourage users to override it.

@you-n-g you-n-g merged commit 9639a8c into microsoft:main Nov 10, 2021
@you-n-g you-n-g deleted the add_default_protocol_version branch November 10, 2021 06:37
qianyun210603 pushed a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
* add default protocol_version

* add comment to serial.Serializable.get_backend
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