Add instruction: always update docs before starting long-running tasks
Browse files
AGENTS.md
CHANGED
|
@@ -73,6 +73,45 @@ Before doing **anything** on this project:
|
|
| 73 |
|
| 74 |
---
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
## Technical Decisions That Work
|
| 77 |
|
| 78 |
### MaskablePPO + Action Masking
|
|
|
|
| 73 |
|
| 74 |
---
|
| 75 |
|
| 76 |
+
## 📋 ALWAYS UPDATE DOCS BEFORE STARTING LONG-RUNNING TASKS
|
| 77 |
+
|
| 78 |
+
> **This rule prevents lost context when sessions crash or reset.**
|
| 79 |
+
|
| 80 |
+
Before submitting any multi-hour HF Job or starting any long-running compute:
|
| 81 |
+
|
| 82 |
+
1. **Update `session_state.json`** with:
|
| 83 |
+
- Current phase and status
|
| 84 |
+
- What you are about to do (job_id if resuming, script name, hardware, timeout)
|
| 85 |
+
- Why you are doing it (link to research/decisions)
|
| 86 |
+
- Expected completion time
|
| 87 |
+
|
| 88 |
+
2. **Update `AGENTS.md`** if you learned anything new:
|
| 89 |
+
- New mistakes or fixes
|
| 90 |
+
- New technical decisions with rationale
|
| 91 |
+
- Cost lessons
|
| 92 |
+
- API gotchas
|
| 93 |
+
|
| 94 |
+
3. **Update `docs/ae.md`** with research findings:
|
| 95 |
+
- New papers read (arxiv IDs, key insights)
|
| 96 |
+
- New datasets or methods discovered
|
| 97 |
+
- Results from completed phases
|
| 98 |
+
|
| 99 |
+
4. **Push all updates to the Hub** BEFORE starting the job:
|
| 100 |
+
```python
|
| 101 |
+
hf_repo_files(operation="upload", repo_id="E-Rong/til-26-ae-agent",
|
| 102 |
+
path="session_state.json", content=...)
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
**Why this matters**: If your session resets while a job is running, the next version of you has ZERO memory. The only way to reconstruct state is from the Hub. If docs are stale, you'll waste time (and money) redoing work or making the same mistakes.
|
| 106 |
+
|
| 107 |
+
**This rule applies to**:
|
| 108 |
+
- Any HF Job with `timeout > 30m`
|
| 109 |
+
- Any smoke test (even 5-minute ones — document what you're testing)
|
| 110 |
+
- Any evaluation run > 100 episodes
|
| 111 |
+
- Any data processing that takes > 15 minutes
|
| 112 |
+
|
| 113 |
+
---
|
| 114 |
+
|
| 115 |
## Technical Decisions That Work
|
| 116 |
|
| 117 |
### MaskablePPO + Action Masking
|