You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consistent HTTP 403 Figshare error since December 27 #32961
I am going to lock this issue since it was a temporary Figshare issue that was solved.
I don't think the scikit-learn issue tracker is the right place to discuss other Figshare issue or add tips on VPN setup in some cases. A personal blog may be more appropriate.
This is the answer I got in my Figshare support ticket:
Unfortunately, we had to stop any downloads via scripting methods or CURL commands. The download at the moment can be done only via the
website interface.
We are working to fix these problems, but unfortunately,y we don't have an estimation for when these download options will work again.
I tried to ask for a bit more details on a very rough timeline (is it a matter of days, weeks, months?) to help us decide if we want some work-around for the scikit-learn CI at least.
Here is a bit more details, I didn't manage some kind of rough timeline 😓:
It is a temporary problem.
Both Figshare and Dimensions have experienced sustained Distributed Denial of Service attacks recently.
The teams are working tirelessly to limit any impact.
Hopefully this will be sorted out soonish.
In the mean time the CircleCI CI has started to fail on main today, see build log. Looks like the cache can not be found, maybe it is invalidated after a few days, not idea ...
I won't be able to take a look before beginning of January and, anyway, looks like our best course of action is to wait and hope that Figshare solves the issue.
For now CircleCI does not seem affected, thanks to caching likely.
Unfortunately, this is no longer the case.
How to deal with PRs which are blocked by this failure? I tried to push a commit with [doc skip] but this is not enough to get a green CI (see #32969 (comment)).
Shall we try to change the circle ci config to make ensure a green (gray) build with [doc skip]?
Shall we change the permissions to allow the merge of PRs without a green CI?
Shall we move the figshare.com hosted datasets to a new place (e.g. a dedicated github repo under our org, assuming there are all small enough)?
For the case of the scikit-learn CI, there are only 2 failures, and both of them are caused by fetch_olivetti_faces.
However, we have 8 datasets in total that rely on figshare.com hosting. Some of the other 7 datasets (e.g. california housing) are also used in examples, so I am not sure why they do not fail yet.
For the case of the scikit-learn CI, there are only 2 failures, and both of them are caused by fetch_olivetti_faces.
However, we have 8 datasets in total that rely on figshare.com hosting. Some of the other 7 datasets (e.g. california housing) are also used in examples, so I am not sure why they do not fail yet.
I've not been able to retrieve the California_housing dataset (for a course I'm doing) this week, so I manually downloaded the dataset from figshare
We've had problems downloading data from figshare a few times in the past in the CI. (Probably the same is true for openml?). This makes me think we should try and find a way to rely less on downloaded datasets.
Some ideas for how to do this:
mirror the datasets to storage we control/pay for
use more synthetic data in our tests
use a small number of datasets (one or two?) for all of our tests
run a proxy that caches the datasets for a very long/infinite time
I numbered the options I could think of to make it easier to refer to them, not as an indication of preference.
I don't like the idea of mirroring the datasets. They will eventually become out of sync or other "wonderfully weird" things will happen. However it is pragmatic because these "weird changes" will probably happen less often than access issues.
I think (2) might be doable for the tests, but I think our examples would be a lot less good if they used synthetic data only. At least the easy to generate datasets are very abstract (I find).
Not sure if (3) would help us in the current case. But it might reduce the load on dataset hosts, which frees up time/resources to work on other things that will make them even more reliable.
Option (4) is probably easy on day one and day two. We could cache things for a very long time and empty the cache whenever we need to have the cached version refreshed. A tricky thing is that people will discover that we have this proxy and will start using it. So we would need some kind of authentication layer. And now this starts to be a bigger project already.
So overall, no great options? I'm kinda excited about (4) but that is the technologist in me talking, not the person who can predict 5 months into the future. What other ideas are there?
Shall we move the figshare.com hosted datasets to a new place (e.g. a dedicated github repo under our org, assuming there are all small enough)?
and
I don't like the idea of mirroring the datasets. They will eventually become out of sync or other "wonderfully weird" things will happen. However it is pragmatic because these "weird changes" will probably happen less often than access issues.
In sklearn.datasets._base._fetch_remote, why can't you modify the behavior to pull datasets from:
the local cache at first,
the mirror (a dedicated datasets GH repository), if the previous is missing or has a different hash,
the original figshare URL, if the previous has a different hash.
Comparing the hash ensures that you always have the correct data.
Also, the dedicated datasets GH repository can be updated using a daily routine that pulls datasets from figshare, and make the update as needed.
If we go back in time and look at downtime, I would be happy with a figshare and an OpenML fallback because I think that it would have work for all the known failures (both services were not down at the same time).
This solution together with local cache and checksum checks (local, figshare, and OpenML have metadata containing the checksum) should be quite reliable.
In skrub, we used such redundancy with GH and OSF.
In skrub, we used such redundancy with GH and OSF.
How did you set that up? Can we use the existing setup in scikit-learn?
Modifying the fetching mechanism that everyone who uses the library uses sounds tricky. I don't think I'd want to be responsible for a proxy/mirror used by all the people who use scikit-learn - scikit-learn maintainers are not in the business of running services. So an ideal solution would be something that can be enabled by setting a environment variable like HTTP_PROXY in the CI jobs or we pre-fetch datasets in the CI job to populate the local cache. No special code in the library itself.
NVIDIA/cuml#7637 is one of the PRs in cuml that switch from hosted datasets to using synthetic ones.
I'm thinking that having a step at the start of our CI jobs that fetches the datasets and places them in the cache directory would be the way to do this. This custom step can fetch the data from the original host or a mirror that we use for CI purposes. Maybe we can use CI artefacts/cache for this?
I'm thinking that having a step at the start of our CI jobs that fetches the datasets and places them in the cache directory would be the way to do this. This custom step can fetch the data from the original host or a mirror that we use for CI purposes. Maybe we can use CI artefacts/cache for this?
Sounds like a plan.
Note that for all the fetch_dataset_name helper that are based on the _fetch_remote / RemoteFileMetadata patterns, we could extend this pattern to allow RemoteFileMetadata to points to several alternative URLs (e.g. figshare.com and a scikit-learn specific github.io-based static mirror). We wouldn't have too many files to manage this way and since we store their sha256 digest in the scikit-learn source code and check it for integrity, any data corruption bug or attack should be easily and safely caught prior to loading the corrupted data.
That would not work for the fetch_openml based datasets, though. But the reliability of openml.org has increased over the past year, so maybe this is not a problem.
From #33019 my conclusion is that we can't use the caching built in to CI for this. Sad times. The reason for this is that only GitHub Actions allows jobs from different forks to share the cache. CircleCI doesn't allow it and for Azure I think it is also not possible.
This means we need to host things somewhere else. We could make a GitHub repository that contains the contents of ~/sklearn_datasets and then git checkout --max-depth 1 in each of our jobs that needs it.
Personally I would be in favour of doing nothing about this Figshare, let's call it "episode" for lack of a better term. If someone else has a strong opinion about this, feel free to open a separate issue and summarize what was already said in this issue. If there is a similar "episode" in the not so far future, I would be open to revisit this.
Side-comments: as I suspected the HTTP 403 are linked to some Figshare anti-abuse detection (I asked about this in the Figshare ticket). I guess some IP ranges gets black-listed when too many downloads come from these IPs, which can happen from time to time in CI VMs.
For example right now, Boydton, Virginia is not a good place to be if you are a CI VM and you are trying to download Figshare data (3 of the 4 last failures), here is an example IP address.
I am going to lock this issue since it was a temporary Figshare issue that was solved.
I don't think the scikit-learn issue tracker is the right place to discuss other Figshare issue or add tips on VPN setup in some cases. A personal blog may be more appropriate.
Activity
[-]Consistent HTTP 403 Figshare error[/-][+]Consistent HTTP 403 Figshare error since December 27[/+]miraculixx commentedon Dec 29, 2025
it is affected in custom builds that load the california dataset, e.g. https://ndownloader.figshare.com/files/5976036
as used in @omegaml builds
I can reproduce locally, so it does not seem to be specific to IP filtering
lesteve commentedon Dec 30, 2025
This is the answer I got in my Figshare support ticket:
I tried to ask for a bit more details on a very rough timeline (is it a matter of days, weeks, months?) to help us decide if we want some work-around for the scikit-learn CI at least.
A while ago, I created https://github.com/lesteve/scikit_learn_data with the content of my
~/scikit_learn_datafolder. Not sure how complete this is, but maybe it can be of some use for us in the future ...Warning
~/scikit_learn_datacontains pickle files that will be loaded when you usesklearn.datasets.fetch_*, which means it could run arbitrary code. Only use https://github.com/lesteve/scikit_learn_data if you have a good reason to trust me and don't use ascikit_learn_datafolder from a stranger on the internet.lesteve commentedon Dec 31, 2025
Here is a bit more details, I didn't manage some kind of rough timeline 😓:
Hopefully this will be sorted out soonish.
In the mean time the CircleCI CI has started to fail on
maintoday, see build log. Looks like the cache can not be found, maybe it is invalidated after a few days, not idea ...I won't be able to take a look before beginning of January and, anyway, looks like our best course of action is to wait and hope that Figshare solves the issue.
ogrisel commentedon Jan 5, 2026
Unfortunately, this is no longer the case.
How to deal with PRs which are blocked by this failure? I tried to push a commit with
[doc skip]but this is not enough to get a green CI (see #32969 (comment)).Shall we try to change the circle ci config to make ensure a green (gray) build with
[doc skip]?Shall we change the permissions to allow the merge of PRs without a green CI?
Shall we move the figshare.com hosted datasets to a new place (e.g. a dedicated github repo under our org, assuming there are all small enough)?
thomass-dev commentedon Jan 5, 2026
It also affects users who have no
~/scikit_learn_datacache available, so the third solution (or anything like that) seems preferable to me.ogrisel commentedon Jan 5, 2026
For the case of the scikit-learn CI, there are only 2 failures, and both of them are caused by
fetch_olivetti_faces.However, we have 8 datasets in total that rely on figshare.com hosting. Some of the other 7 datasets (e.g. california housing) are also used in examples, so I am not sure why they do not fail yet.
Griffo81 commentedon Jan 5, 2026
I've not been able to retrieve the California_housing dataset (for a course I'm doing) this week, so I manually downloaded the dataset from figshare
betatim commentedon Jan 5, 2026
We've had problems downloading data from figshare a few times in the past in the CI. (Probably the same is true for openml?). This makes me think we should try and find a way to rely less on downloaded datasets.
Some ideas for how to do this:
I numbered the options I could think of to make it easier to refer to them, not as an indication of preference.
I don't like the idea of mirroring the datasets. They will eventually become out of sync or other "wonderfully weird" things will happen. However it is pragmatic because these "weird changes" will probably happen less often than access issues.
I think (2) might be doable for the tests, but I think our examples would be a lot less good if they used synthetic data only. At least the easy to generate datasets are very abstract (I find).
Not sure if (3) would help us in the current case. But it might reduce the load on dataset hosts, which frees up time/resources to work on other things that will make them even more reliable.
Option (4) is probably easy on day one and day two. We could cache things for a very long time and empty the cache whenever we need to have the cached version refreshed. A tricky thing is that people will discover that we have this proxy and will start using it. So we would need some kind of authentication layer. And now this starts to be a bigger project already.
So overall, no great options? I'm kinda excited about (4) but that is the technologist in me talking, not the person who can predict 5 months into the future. What other ideas are there?
thomass-dev commentedon Jan 5, 2026
Based on
and
In
sklearn.datasets._base._fetch_remote, why can't you modify the behavior to pull datasets from:Comparing the hash ensures that you always have the correct data.
Also, the dedicated datasets GH repository can be updated using a daily routine that pulls datasets from figshare, and make the update as needed.
glemaitre commentedon Jan 5, 2026
My feeling would be to have some redundancy.
If we go back in time and look at downtime, I would be happy with a figshare and an OpenML fallback because I think that it would have work for all the known failures (both services were not down at the same time).
This solution together with local cache and checksum checks (local, figshare, and OpenML have metadata containing the checksum) should be quite reliable.
In skrub, we used such redundancy with GH and OSF.
betatim commentedon Jan 5, 2026
How did you set that up? Can we use the existing setup in scikit-learn?
Modifying the fetching mechanism that everyone who uses the library uses sounds tricky. I don't think I'd want to be responsible for a proxy/mirror used by all the people who use scikit-learn - scikit-learn maintainers are not in the business of running services. So an ideal solution would be something that can be enabled by setting a environment variable like
HTTP_PROXYin the CI jobs or we pre-fetch datasets in the CI job to populate the local cache. No special code in the library itself.1 remaining item
ogrisel commentedon Jan 6, 2026
That won't solve the problem of running the examples to build the doc which is our main problem at the moment.
betatim commentedon Jan 6, 2026
https://github.com/skrub-data/skrub/blob/main/skrub/datasets/_utils.py is how skrub implemented this.
NVIDIA/cuml#7637 is one of the PRs in cuml that switch from hosted datasets to using synthetic ones.
I'm thinking that having a step at the start of our CI jobs that fetches the datasets and places them in the cache directory would be the way to do this. This custom step can fetch the data from the original host or a mirror that we use for CI purposes. Maybe we can use CI artefacts/cache for this?
ogrisel commentedon Jan 6, 2026
Sounds like a plan.
Note that for all the
fetch_dataset_namehelper that are based on the_fetch_remote/RemoteFileMetadatapatterns, we could extend this pattern to allowRemoteFileMetadatato points to several alternative URLs (e.g. figshare.com and a scikit-learn specific github.io-based static mirror). We wouldn't have too many files to manage this way and since we store their sha256 digest in the scikit-learn source code and check it for integrity, any data corruption bug or attack should be easily and safely caught prior to loading the corrupted data.That would not work for the
fetch_openmlbased datasets, though. But the reliability of openml.org has increased over the past year, so maybe this is not a problem.thomass-dev commentedon Jan 6, 2026
figshare seems to be accessible again.
lesteve commentedon Jan 7, 2026
Indeed, according to https://github.com/lesteve/test-figshare-fetchers/actions
sklearn.datasets.fetch_functions have started working again since around January 6 (yesterday) 9PM GMT+1.betatim commentedon Jan 7, 2026
From #33019 my conclusion is that we can't use the caching built in to CI for this. Sad times. The reason for this is that only GitHub Actions allows jobs from different forks to share the cache. CircleCI doesn't allow it and for Azure I think it is also not possible.
This means we need to host things somewhere else. We could make a GitHub repository that contains the contents of
~/sklearn_datasetsand thengit checkout --max-depth 1in each of our jobs that needs it.lesteve commentedon Jan 9, 2026
The Figshare issue seems fixed according to https://github.com/lesteve/test-figshare-fetchers/actions. There are still some sporadic HTTP 403 failures but this is the old "known" behaviour and is tracked in #30761.
Personally I would be in favour of doing nothing about this Figshare, let's call it "episode" for lack of a better term. If someone else has a strong opinion about this, feel free to open a separate issue and summarize what was already said in this issue. If there is a similar "episode" in the not so far future, I would be open to revisit this.
Side-comments: as I suspected the HTTP 403 are linked to some Figshare anti-abuse detection (I asked about this in the Figshare ticket). I guess some IP ranges gets black-listed when too many downloads come from these IPs, which can happen from time to time in CI VMs.
For example right now, Boydton, Virginia is not a good place to be if you are a CI VM and you are trying to download Figshare data (3 of the 4 last failures), here is an example IP address.
ElizabethWallace97 commentedon Feb 2, 2026
lesteve commentedon Feb 3, 2026
FlorianTseng commentedon Feb 5, 2026
lesteve commentedon Feb 5, 2026
I am going to lock this issue since it was a temporary Figshare issue that was solved.
I don't think the scikit-learn issue tracker is the right place to discuss other Figshare issue or add tips on VPN setup in some cases. A personal blog may be more appropriate.