Skip to content

CI Store datasets in a shared cache for CircleCI - #33019

Closed
betatim wants to merge 1 commit into
scikit-learn:mainfrom
betatim:circleci-dataset-caching
Closed

betatim wants to merge 1 commit into
scikit-learn:mainfrom
betatim:circleci-dataset-caching

Conversation

@betatim

@betatim betatim commented Jan 7, 2026

Copy link
Copy Markdown
Member

Reference Issues/PRs

Towards #32961

What does this implement/fix? Explain your changes.

Only jobs that run on main or a release branch can update the cache, all other jobs try to use it. We don't want jobs triggered by forks to write to the cache.

The goal is to implement a cache that is shared between all jobs, no matter which PR they belong to. The cache should contain the datasets that are downloaded from a remote host (eg figshare). Assuming that figshare and co are mostly available we should be able to populate the cache and then use it. During an outage the chances are that we have a full cache already and don't notice it. Even a run on main would use the existing cache, so shouldn't be effected by an outage.

🔴 From reading https://circleci.com/docs/guides/optimize/caching/#caching-and-open-source I am actually pretty sure that this setup doesn't achieve what I'd like. It sounds like different forks have different caches (even for the same cache key)?

One thing that I am not 100% sure about is the fact that we already had this kind of caching setup for the docs builds. Yet during the last outage of figshare we observed some failures. Maybe the explanation for this is that each PR had their own cache and if the PR was created before the outage started it had the datasets in cache, but newer PRs didn't.

AI usage disclosure

I used AI assistance for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Only jobs that run on `main` or a release branch can update the cache,
all other jobs try to use it. We don't want jobs triggered by forks to
write to the cache.
@betatim

betatim commented Jan 7, 2026

Copy link
Copy Markdown
Member Author

I'll close this. It seems like CircleCI and Azure probably as well don't let you share caches. So the builtin caches in the CI system are probably a dead end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant