Spaces:
Sleeping
Sleeping
File size: 1,943 Bytes
38f4bc1 a321b61 38f4bc1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# HuggingFace Space Deployment Notes
## Issue: Auto-Rebuild Not Triggering
**Problem**: Pushing commits to GitHub doesn't always trigger HF Space rebuild automatically.
**CRITICAL**: HF Space uses `main` branch, local repo uses `master` branch!
**Correct Push Command**:
```bash
git push origin master # Push to GitHub (master branch)
git push hf-new master:main # Push to HF Space (main branch)
```
**Symptoms**:
- Code pushed to GitHub successfully
- Space shows "RUNNING" status
- But still executing old code (verified by same errors)
**Solution**: Manual Factory Reboot
1. Go to Space Settings: https://huggingface.co/spaces/evgueni-p/fbmc-chronos2/settings
2. Scroll to bottom
3. Click "Factory Reboot"
4. Wait 3-5 minutes
## Verifying Rebuild
Check if new code is deployed by looking for these changes in error logs/behavior:
- **Old code (pre-7a9aff9)**: batch_size=256 (default), 9 quantiles
- **New code (7a9aff9+)**: batch_size=32, 3 quantiles
Error signature of old code:
```
Tried to allocate 10.75 GiB
18.04 GiB memory in use
```
Expected behavior with new code:
- Much lower memory usage (~3-5 GB instead of 18 GB)
- Should complete 38-border forecast without OOM
## Alternative: Direct Space Editing
If repeated rebuilds fail, can edit directly in Space:
1. Go to Space "Files" tab
2. Edit `src/forecasting/chronos_inference.py` directly
3. Add `batch_size=32, quantile_levels=[0.1, 0.5, 0.9]` to predict_df() call
4. Space auto-rebuilds on file save
## Last Resort: Local Execution
If HF Space continues failing, can run locally:
```bash
# Requires: GPU with >8GB VRAM, dataset downloaded
cd /c/Users/evgue/projects/fbmc_chronos2
.venv/Scripts/python.exe evaluate_forecasts.py # Uses local model
```
## Git Commits Related to This Issue
- 7a9aff9: Memory optimization (batch_size=32, 3 quantiles)
- caf0333: Documentation of Session 11
---
**Created**: 2025-11-17
**Last Updated**: 2025-11-17
|