microsoft / microsoft/qlib

NameError: name 'rolling_resi' is not defined

Open
#1,238 8 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

File ~\AppData\Roaming\Python\Python38\site-packages\qlib\data\data.py:917, in LocalDatasetProvider.dataset(self, instruments, fields, start_time, end_time, freq, inst_processors)
915 start_time = cal[0]
916 end_time = cal[-1]
--> 917 data = self.dataset_processor(
918 instruments_d, column_names, start_time, end_time, freq, inst_processors=inst_processors
919 )
921 return data

File ~\AppData\Roaming\Python\Python38\site-packages\qlib\data\data.py:572, in DatasetProvider.dataset_processor(instruments_d, column_names, start_time, end_time, freq, inst_processors)
562 inst_l.append(inst)
563 task_l.append(
564 delayed(DatasetProvider.inst_calculator)(
565 inst, start_time, end_time, freq, normalize_column_names, spans, C, inst_processors
566 )
567 )
569 data = dict(
570 zip(
571 inst_l,
--> 572 ParallelExt(n_jobs=workers, backend=C.joblib_backend, maxtasksperchild=C.maxtasksperchild)(task_l),
573 )
574 )
576 new_data = dict()
577 for inst in sorted(data.keys()):

File H:\A_software\Anaconda3\envs\py386\lib\site-packages\joblib\parallel.py:1056, in Parallel.call(self, iterable)
1053 self._iterating = False
1055 with self._backend.retrieval_context():
-> 1056 self.retrieve()
1057 # Make sure that we get a last message telling us we are done
1058 elapsed_time = time.time() - self._start_time

File H:\A_software\Anaconda3\envs\py386\lib\site-packages\joblib\parallel.py:935, in Parallel.retrieve(self)
933 try:
934 if getattr(self._backend, 'supports_timeout', False):
--> 935 self._output.extend(job.get(timeout=self.timeout))
936 else:
937 self._output.extend(job.get())

File H:\A_software\Anaconda3\envs\py386\lib\multiprocessing\pool.py:771, in ApplyResult.get(self, timeout)
769 return self._value
770 else:
--> 771 raise self._value

NameError: name 'rolling_resi' is not defined

🐛 Bug Description

To Reproduce

Steps to reproduce the behavior:

Expected Behavior

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:
  • 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.

Research direction

Start in qlib/data/data.py around LocalDatasetProvider.dataset and DatasetProvider.dataset_processor, especially the calls at lines 917 and 572, then trace where rolling_resi is referenced. Reproduce the reported dataset operation and verify that it completes without the NameError; add regression coverage if the relevant test location is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.