Skip to content

add default protocol_version#677

Merged
you-n-g merged 2 commits intomicrosoft:mainfrom
zhupr:add_default_protocol_version
Nov 10, 2021
Merged

add default protocol_version#677
you-n-g merged 2 commits intomicrosoft:mainfrom
zhupr:add_default_protocol_version

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
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
you-n-g pushed a commit to you-n-g/qlib that referenced this pull request Aug 16, 2025
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