Closed philip-ndikum closed 2 days ago
hey, thanks for trying out Narwhals
Unit tests are failing with TypeError: issubclass() arg 1 must be a class
this sounds like it might be a bug in Narwhals - if you could come up with a reproducible example I can take a look 🙏
Ah fantastic thank you @MarcoGorelli. Your responsiveness is truly appreciated! I'll try to do this as soon as I can in the narwhals repo. Thank you! CC @kanenorman for some of the bugs we've observed.
Is your request related to a feature in the roadmap? Please specify. This relates to the target shifter implementation in MODE_SINGLE_STEP, specifically the SingleStepTargetShifter class which provides scikit-learn style interface for temporal target shifting.
Describe the problem or enhancement you'd like to address The SingleStepTargetShifter is experiencing type casting errors when working with different DataFrame backends through Narwhals. Specifically:
TypeError: issubclass() arg 1 must be a class
_get_row_count
method when casting count to 'int64'The issue impacts the workflow:
Describe the solution you'd like The solution should:
Technical approach:
_get_row_count
method to handle type casting correctly through NarwhalsDescribe alternatives you've considered
Using native backend type casting instead of Narwhals operations
Removing explicit type casting
Using a different approach to row counting
Additional context