Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/test-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,15 @@ jobs:
done
echo "::warning::could not pre-warm the embedding model after 3 attempts; the dataset step will retry"

# The tiny Stack Overflow dataset with its vectors: embedding it takes 8 minutes on linux and 12 to 16 on macOS and Windows
# (the longest step of the nightly run), and the bytes are the same every night. scripts/run_examples.sh reuses the
# directory when it holds the marker file it writes after a complete download. The key changes with download_data.py.
- name: Cache the Stack Overflow Tiny dataset
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: examples/data/stackoverflow-tiny
key: so-tiny-vectors-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('examples/download_data.py') }}

- name: Download datasets
run: bash scripts/run_examples.sh datasets

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test-python-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,15 @@ jobs:
done
echo "::warning::could not pre-warm the embedding model after 3 attempts; the dataset step will retry"

# The tiny Stack Overflow dataset with its vectors: embedding it takes 8 minutes on linux and 12 to 16 on macOS and Windows
# (the longest step of the nightly run), and the bytes are the same every night. scripts/run_examples.sh reuses the
# directory when it holds the marker file it writes after a complete download. The key changes with download_data.py.
- name: Cache the Stack Overflow Tiny dataset
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: examples/data/stackoverflow-tiny
key: so-tiny-vectors-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('examples/download_data.py') }}

- name: Download datasets
shell: bash
run: |
Expand Down
18 changes: 16 additions & 2 deletions scripts/run_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,28 @@ datasets() {
fetch movielens-small movielens-small
fi

if echo "$examples" | grep -qE '(^|[[:space:]])(07_stackoverflow_tables_oltp|08_stackoverflow_tables_olap|09_stackoverflow_graph_oltp|10_stackoverflow_graph_olap|13_stackoverflow_hybrid_queries)\.py([[:space:]]|$)'; then
# The tiny Stack Overflow dataset with its vectors takes 8 to 16 minutes to embed on a runner and is the same bytes every night
# (pinned dump, pinned model). The workflows cache examples/data/stackoverflow-tiny, keyed on download_data.py; this marker says
# the cached directory is the complete one (vectors included), which also serves the no-vector examples.
tiny_marker="data/stackoverflow-tiny/.ci-vectors-complete"
tiny_cached=0
if [ -f "$tiny_marker" ]; then
tiny_cached=1
echo "♻️ Reusing the cached Stack Overflow Tiny dataset (with vectors)"
fi

if [ "$tiny_cached" -eq 0 ] && echo "$examples" | grep -qE '(^|[[:space:]])(07_stackoverflow_tables_oltp|08_stackoverflow_tables_olap|09_stackoverflow_graph_oltp|10_stackoverflow_graph_olap|13_stackoverflow_hybrid_queries)\.py([[:space:]]|$)'; then
echo "📥 Downloading Stack Overflow Tiny dataset (no vectors)..."
fetch stackoverflow-tiny-novec stackoverflow-tiny --no-vectors
fi

if echo "$examples" | grep -qE '(^|[[:space:]])(11_vector_index_build|12_vector_search)\.py([[:space:]]|$)'; then
if [ "$tiny_cached" -eq 0 ] && echo "$examples" | grep -qE '(^|[[:space:]])(11_vector_index_build|12_vector_search)\.py([[:space:]]|$)'; then
echo "📥 Downloading Stack Overflow Tiny dataset (with vectors)..."
fetch stackoverflow-tiny stackoverflow-tiny
case " $SKIPPED_DATASETS " in
*" stackoverflow-tiny "*) ;;
*) touch "$tiny_marker" ;;
esac
fi

# HAND THE SKIP LIST TO THE NEXT STEP.
Expand Down
Loading