microsoft / microsoft/qlib

examples/rl_order_execution doesn't work correctly

Open
#1,491 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
48.7k
Forks
7.7k
PR merge metrics
No merged PRs in 30d

Description

🐛 Bug Description

Unable to run through the example according to the process

To Reproduce

Steps to reproduce the behavior:

1."Get Data" step—— success
2."Generate Pickle-Style Data" step:——success
3."Training" step—— report error:
"weakly-referenced object no longer exists"
4:change source code:
qlib.rl.utils.env_wrapper.py line 119 "obj.env = weakref.proxy(self)" to "obj.env = self"
—— report error: "cannot pickle 'generator' object"
5: Comment out a piece of code——"obj.env = weakref.proxy(self)"
——report error: "BrokenPipeError: [WinError 109] The pipe has been ended"
6: parameters "concurrency: 4" in "train_opds.yml",will cost 110G memory at runtime

Expected Behavior

I hope to be able to run through the entire process

Screenshot

Environment

Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.

  • Qlib version: 0.9.1.99
  • Python version: 3.8.9
  • OS (Windows, Linux, MacOS): Windows11
  • Commit number (optional, please provide it if you are using the dev version):

Additional Notes

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the steps in examples/rl_order_execution on the reported Python 3.8.9 and Windows 11 environment, then inspect qlib.rl.utils.env_wrapper.py around line 119 and the concurrency setting in train_opds.yml. Compare each failure during training, including the weak-reference, pickling, pipe, and memory errors. Done means the complete example runs successfully without requiring excessive memory.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.