FIX - changed broken endpoint for reuters dataset #31186
Merged
+1
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes bug #31185.
Problem
The
plot_out_of_core_classification.py
example was failing with a StopIteration error when callingvectorizer.transform(X_test_text)
. This problem occurred both by running the script directly and during the documentation build (make html
).As reported in bug #31185, the traceback indicated that the raw_X iterator within HashingVectorizer was empty, causing the
StopIteration
error at thenext(raw_X)
call.Root Cause
The error was caused by the fact that the URL used to download the dataset Reuters-21578, needed for the example, was broken or no longer valid. As a result, the dataset was not being downloaded properly, leading to empty test data (
X_test_text
).Solution
This PR updates the constant DOWNLOAD_URL in the code related to fetching the Reuters dataset to point to the working URL hosted on the UCI Machine Learning repository.