Repository navigation
CI: cache the tiny Stack Overflow dataset with its vectors in the examples jobs - #565
Merged
Merged
Conversation
…mples jobs The datasets step embeds about 9,600 texts on every leg of every run: 474 s on linux/amd64, 771 s on windows, 1015 s on macOS (nightly 2026-12-02, run 46806951762), more than half of each leg and the longest step of the nightly run. The bytes are the same every night (pinned dump, pinned model). The directory is cached per OS and architecture, keyed on download_data.py, and run_examples.sh reuses it when it holds the marker written after a complete download.
Collaborator
Author
|
The cache from this PR works: the I compared the nightly
The first main run after the merge (2026-12-02 15:23Z) still downloaded and saved the cache. Every main and nightly run since then restored it, and no run saved it again. The nightly of 2026-12-04 has not run yet, so I will add it here if it differs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
The examples jobs spend more than half of each leg on the
Download datasetsstep, and almost all of that is embedding the tiny Stack Overflow dataset (about 9,600 texts withall-MiniLM-L6-v2) on a CPU runner. The input is a pinned dump and a pinned model, so every night produces the same bytes. This PR cachesexamples/data/stackoverflow-tinyper OS and architecture, keyed onexamples/download_data.py, intest-python-examples.ymlandtest-native.yml.scripts/run_examples.sh datasetsskips both Stack Overflow downloads when the directory holds the marker file.ci-vectors-complete, which it writes only after a complete download with vectors (not when the host was unreachable).Measured on the nightly of 2026-12-02 (run 46806951762), step
Download datasetsagainstRun all examples:The
[VECTORS]embedding is 985 s of the 1015 s on macOS. The cache is saved by the first successful leg of a key and restored by the rest, so the saving starts from the second run after this merges. Required checks are unchanged.How was it checked?
bash -n scripts/run_examples.sh, both workflow files parsed as YAML. The after-time comes from this PR's examples leg on its second run (the first one saves the cache); I will add it as a comment.