Repository navigation
fix(eva): handle DataFrame input in pred_autocorr - #2372
Misty_Cirque (Cyber-Marty) wants to merge 2 commits into
Conversation
|
The reorder is right: A different second column fixes that, for example |
|
Correction to my example column: I re-ran it and |
|
Thanks for pointing this out and correcting the example. I reproduced it with qlib's actual Updated in commit
Validation on Windows 11 / Python 3.12.14 / pandas 2.3.3 / NumPy 2.5.4:
No market data was downloaded, and the full data pipeline was not run. Thanks for helping make the regression test check its stated contract rather than just the absence of an exception. |
Description
Move the DataFrame warning before selecting its first column in
pred_autocorr, so the warning can read the DataFrame's column names. Add a synthetic-data regression test that compares DataFrame input with its first Series column.Motivation and Context
Fixes #2371. Previously, every DataFrame input raised
AttributeErroratpred.columnsbecausepredhad already become a Series. The documented Series path is unchanged.How Has This Been Tested?
mainwithAttributeError: 'Series' object has no attribute 'columns'and passes with this change.git diff --checkpasses.The regression test uses only synthetic predictions and no market data.
Types of changes