Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails in test_causal_trees.py, no attribute _support_missing_values #733

Closed
ras44 opened this issue Jan 26, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@ras44
Copy link
Collaborator

ras44 commented Jan 26, 2024

Describe the bug
Builds are failing with a new error:

FAILED tests/test_causal_trees.py::TestCausalRandomForestRegressor::test_fit[5] - AttributeError: 'CausalTreeRegressor' object has no attribute '_support_missing_values'

See build at: https://github.com/uber/causalml/actions/runs/7626474561/job/20772942656?pr=722

To Reproduce

Follow build at: https://github.com/uber/causalml/actions/runs/7626474561/job/20772942656?pr=722

Expected behavior
No failure during build

Screenshots
image

Environment (please complete the following information):
See build at: https://github.com/uber/causalml/actions/runs/7626474561/job/20772942656?pr=722

Additional context
N/A

@ras44 ras44 added the bug Something isn't working label Jan 26, 2024
@jeongyoonlee
Copy link
Collaborator

This is due to the recent change in scikit-learn introduced by scikit-learn/scikit-learn#26391, which added _support_missing_values() to _tree._classes.py that is called by ensemble._validate_X_predict().

We can either add _support_missing_values() to our _tree._class.py or add our own _validate_X_predict() for CausalTreeRegressor/CausalRandomForestRegressor.

@alexander-pv, what do you think? I will leave it to you.

@alexander-pv
Copy link
Collaborator

Hi, @ras44, @jeongyoonlee, thanks for asking!

I suggest adding _support_missing_values() to _tree._class.py with a temporary placeholder since the issue is directly related to scikit-learn/scikit-learn#23595 where they updated cython backend for that.
I've opened PR #734.

Since I am working on a multiple treatment groups feature in causal trees which is also mainly related to cython, I think I will be able to add missing values support after finishing my WIP idea.

jeongyoonlee pushed a commit that referenced this issue Jan 29, 2024
* Add temp missing values placeholder for causal trees
* Apply black codestyle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants