atakan Claude Sonnet 5 commited on
Commit
5cc9815
·
1 Parent(s): 84d5d03

fix: Ship the RAG index with the deploy -- it was never reaching the Space

Browse files

data/ is (correctly) gitignored to keep multi-GB source PDFs and raw corpora
out of the repo, but that also caught the built index itself, so the Space
never had it: confirmed live via /api/status returning indexed_chunks: 0
right after deploy. The built index (chunks.json + bm25.pkl) is ~23MB, not
multi-GB, so it ships fine as a normal tracked file -- carved out an
exception in .gitignore for just those two files. Tracked both via Git LFS
since chunks.json exceeds the Hub's 10MB plain-blob limit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

.gitattributes ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ data/rag_index/chunks.json filter=lfs diff=lfs merge=lfs -text
2
+ data/rag_index/bm25.pkl filter=lfs diff=lfs merge=lfs -text
.gitignore CHANGED
@@ -14,11 +14,20 @@ __pycache__/
14
  ._*
15
 
16
  # Downloaded and generated data, books, and large corpora
17
- data/
18
  *.pdf
19
  *.djvu
20
  *.epub
21
 
 
 
 
 
 
 
 
 
 
22
  # Model checkpoints and fine-tuned weights
23
  adapters/
24
  checkpoints/
 
14
  ._*
15
 
16
  # Downloaded and generated data, books, and large corpora
17
+ data/*
18
  *.pdf
19
  *.djvu
20
  *.epub
21
 
22
+ # ...except the built RAG index itself (~23MB, not the multi-GB source PDFs
23
+ # it was built from) -- this must ship with every deploy or the Space serves
24
+ # zero retrieved chunks (observed directly: /api/status reported
25
+ # indexed_chunks: 0 with this excluded, since data/ is never pushed to the
26
+ # Space's git repo).
27
+ !data/rag_index/
28
+ !data/rag_index/chunks.json
29
+ !data/rag_index/bm25.pkl
30
+
31
  # Model checkpoints and fine-tuned weights
32
  adapters/
33
  checkpoints/
data/rag_index/bm25.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a44f807feb5042e172378e8a08783266ea1a6aa5788fc37aa5adb28bf2fc20db
3
+ size 9492608
data/rag_index/chunks.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b744f1fb462b3cfc345f24411853b88b6b23fda26459632990a8fc4d3b24841
3
+ size 12949232