microsoft / microsoft/qlib

TypeError in qlib/examples/workflow_by_code.ipynb

Open
#799 8 comments 0 reactions 1 assignee View on GitHub

@Wangwuyi123 is already working on this.

Since Jan 5, 2022.

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

Description

🐛 Bug Description

When I run the analyze graphs section in the workflow_by_code.ipynb in Google colab, I got the following error message. The error came from the line of "from qlib.contrib.report import analysis_model, analysis_position". Everything above that line was running fine. May I know what is the reason for it and how to fix it?

TypeError Traceback (most recent call last)
in ()
----> 1 from qlib.contrib.report import analysis_model, analysis_position
2 from qlib.data import D
3 recorder = R.get_recorder(recorder_id=ba_rid, experiment_name="backtest_analysis")
4 print(recorder)
5 pred_df = recorder.load_object("pred.pkl")

14 frames
/usr/local/lib/python3.7/dist-packages/distributed/config.py in ()
18
19 with open(fn) as f:
---> 20 defaults = yaml.load(f)
21
22 dask.config.update_defaults(defaults)

TypeError: load() missing 1 required positional argument: 'Loader'

To Reproduce

Steps to reproduce the behavior:

1.Load qlib/examples/workflow_by_code.ipynb in Google Colab
2.Run the code from the beginning to the "analyze graphs" section
3.The error will show up when runs the line "from qlib.contrib.report import analysis_model, analysis_position"

Expected Behavior

Screenshot

image

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:
  • Python version:
  • OS (Windows, Linux, MacOS):
  • 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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.