microsoft / microsoft/qlib

workflow_by_code cannot run

Open
#1,100 1 comment 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

import qlib
import pandas as pd
from qlib.constant import REG_CN
from qlib.utils import exists_qlib_data, init_instance_by_config
from qlib.workflow import R
from qlib.workflow.record_temp import SignalRecord, PortAnaRecord
from qlib.utils import flatten_dict

error information is following:


ModuleNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_30552/3062347313.py in
1 import qlib
2 import pandas as pd
----> 3 from qlib.constant import REG_CN
4 from qlib.utils import exists_qlib_data, init_instance_by_config
5 from qlib.workflow import R

ModuleNotFoundError: No module named 'qlib.constant'

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

Reproduce the shown Python imports in a clean Qlib environment, starting with from qlib.constant import REG_CN, and inspect the installed package and version. Compare the workflow_by_code example with the package layout to determine whether the example or installation is mismatched. Done means the workflow runs without ModuleNotFoundError, with a regression check if the repository exposes one.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
fintech-quant, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.