AlixJabda commited on
Commit
b17b1dc
·
1 Parent(s): 5a1ed60

add debug for chroma path

Browse files
Files changed (1) hide show
  1. src/retriever.py +23 -0
src/retriever.py CHANGED
@@ -58,6 +58,29 @@ class LegalRetriever:
58
  self.default_to_contract = default_to_contract
59
  self.min_score = float(min_score)
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  self.client = chromadb.PersistentClient(path=persist_dir)
62
 
63
  try:
 
58
  self.default_to_contract = default_to_contract
59
  self.min_score = float(min_score)
60
 
61
+ import os
62
+ from pathlib import Path
63
+
64
+ # --- DEBUG: Space-Dateisystem prüfen ---
65
+ try:
66
+ print("DEBUG /data exists:", os.path.exists("/data"))
67
+ if os.path.exists("/data"):
68
+ print("DEBUG /data listing:", os.listdir("/data")[:50])
69
+
70
+ print("DEBUG persist_dir:", persist_dir)
71
+ print("DEBUG persist_dir exists:", Path(persist_dir).exists())
72
+ if Path(persist_dir).exists():
73
+ print("DEBUG persist_dir listing:", [p.name for p in Path(persist_dir).iterdir()][:50])
74
+ print("DEBUG chroma.sqlite3 exists:", (Path(persist_dir) / "chroma.sqlite3").exists())
75
+
76
+ # Optional: falls du vermutest, dass es irgendwo tiefer liegt
77
+ if os.path.exists("/data"):
78
+ hits = list(Path("/data").rglob("chroma.sqlite3"))
79
+ print("DEBUG found chroma.sqlite3 files:", [str(p) for p in hits][:10])
80
+ except Exception as e:
81
+ print("DEBUG filesystem check failed:", repr(e))
82
+ # --- /DEBUG ---
83
+
84
  self.client = chromadb.PersistentClient(path=persist_dir)
85
 
86
  try: