TST Handle Connection error in test_load_boston_alternative#21178
TST Handle Connection error in test_load_boston_alternative#21178ogrisel merged 2 commits intoscikit-learn:mainfrom
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 traceIt 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 |
ogrisel
left a comment
There was a problem hiding this comment.
+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
ConnectionErrors can make this test fail if there is a problem with downloading the dataset.This marks the test as xfail in this case.