Spaces:
Sleeping
Sleeping
k22056537 commited on
Commit ·
739eedb
1
Parent(s): 0da4f80
fix: remove aggressive LFS patterns, keep only L2CS weights as LFS
Browse filesSmall checkpoints (mlp_best.pt, scaler_mlp.joblib, etc.) were
being stored as LFS pointers which broke model loading on HF Spaces.
Only the 91 MB L2CSNet_gaze360.pkl needs LFS. Added build-time
checkpoint verification to catch this earlier.
- .gitattributes +2 -2
- Dockerfile +21 -0
.gitattributes
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
checkpoints/L2CSNet_gaze360.pkl filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
models/
|
| 3 |
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 5 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 7 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.db filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
checkpoints/L2CSNet_gaze360.pkl filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
models/L2CS-Net/models/L2CSNet_gaze360.pkl filter=lfs diff=lfs merge=lfs -text
|
| 3 |
*.npz filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 4 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 5 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 7 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.db filter=lfs diff=lfs merge=lfs -text
|
Dockerfile
CHANGED
|
@@ -21,6 +21,27 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 21 |
|
| 22 |
COPY . .
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
RUN npm install && npm run build && mkdir -p /app/static && cp -R dist/* /app/static/
|
| 25 |
|
| 26 |
ENV FOCUSGUARD_CACHE_DIR=/app/.cache/focusguard
|
|
|
|
| 21 |
|
| 22 |
COPY . .
|
| 23 |
|
| 24 |
+
RUN python -c "\
|
| 25 |
+
import os, sys;\
|
| 26 |
+
checks = [\
|
| 27 |
+
('checkpoints/mlp_best.pt', 1000),\
|
| 28 |
+
('checkpoints/scaler_mlp.joblib', 100),\
|
| 29 |
+
('checkpoints/xgboost_face_orientation_best.json', 1000),\
|
| 30 |
+
('checkpoints/hybrid_focus_config.json', 50),\
|
| 31 |
+
];\
|
| 32 |
+
ok = True;\
|
| 33 |
+
for path, min_bytes in checks:\
|
| 34 |
+
if not os.path.isfile(path):\
|
| 35 |
+
print(f'[MISSING] {path}'); ok = False\
|
| 36 |
+
elif os.path.getsize(path) < min_bytes:\
|
| 37 |
+
print(f'[BAD] {path} only {os.path.getsize(path)}B — likely LFS pointer'); ok = False\
|
| 38 |
+
else:\
|
| 39 |
+
print(f'[OK] {path} ({os.path.getsize(path)} bytes)');\
|
| 40 |
+
if not ok:\
|
| 41 |
+
print('Checkpoint verification failed'); sys.exit(1);\
|
| 42 |
+
print('All checkpoints verified')\
|
| 43 |
+
"
|
| 44 |
+
|
| 45 |
RUN npm install && npm run build && mkdir -p /app/static && cp -R dist/* /app/static/
|
| 46 |
|
| 47 |
ENV FOCUSGUARD_CACHE_DIR=/app/.cache/focusguard
|