-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
TST Handle Connection error in test_load_boston_alternative #21178
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
TST Handle Connection error in test_load_boston_alternative #21178
Conversation
Currently a ConnectionResetError can make test fail if there is a problem with downloading the dataset. This marks the test as xfail in this case.
We got sometimes some HTTPS errors with |
I sometimes get this error in pipelines, see this log. Full trace
It is a pity, because this makes the tests suite in CI breaks for unrelated reasons. |
We should implement a retry mechanism in We could also do it for this strategy with a short ad-hoc for loop whe calling Or even: we could have a private helper function to wrap python functions that do HTTP call in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for merging this as it is. I will open a dedicated issue for the retry mechanism in fetch_openml
.
I tried to think of a retry mechanism, thinking that it would be better wrapping the call to pandas in a retry-mechanism, but having a general mechanism over calls which download datasets is not direct. Anyway, this is simple easy fix for a bug which randomly used to happen on the CI. This might be merged or not if we judge starting the CI again is less costly time-wise. I do not have any opinion, and would agree if this is discarded. WDYT @glemaitre? |
Merged. It's a small fix that is easy to improve upon in a follow-up PR if needed. |
Reference Issues/PRs
None.
What does this implement/fix? Explain your changes.
Currently
ConnectionError
s can make this test fail if there is a problem with downloading the dataset.This marks the test as xfail in this case.