Skip to content

Commit 2ae0d97

Browse files
committed
Document the tally, steering, budgets, and snapshot semantics
- README: tally line in the build stages, statistical-rules-through- the-tally framing, add_budget/fail-fast note, atlas_message in the unattended section - getting started: res$tally in the results anatomy; snapshot refresh - sessions: results-are-snapshots section; complete run-directory table (test.rds, tally.csv, turns archives, test_leaderboard.csv, message.txt) - pkgdown: atlas_message in the reference index; site rebuilt - NEWS: add_budget and fail-fast tell entries
1 parent 0fa4d19 commit 2ae0d97

27 files changed

Lines changed: 674 additions & 98 deletions

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# atlas (development version)
22

3+
* New `$add_budget(steps, seconds)`: explicitly extend an exhausted
4+
session's mechanical budget; the extension persists for resumes.
5+
* `$tell()` on an out-of-budget session now fails fast in R - nothing is
6+
sent to the LLM - with the remedy in the error message.
7+
38
* Fixed: a warning inside an agent code chunk (e.g. `glm.fit: fitted
49
probabilities numerically 0 or 1 occurred`) aborted the rest of the
510
chunk, so later statements - including the `atlas_models` assignment -

README.Rmd

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ Every run walks the same six stages, and you hold the pen at stage 2:
8383
constraints. Approval is a conversation: whatever you type is folded
8484
into the plan.
8585
3. **Build** - up to `n_models` candidates, compared on held-out data.
86+
Every model and tweak is scored the moment it is evaluated: atlas keeps
87+
a live tally, compares against the best so far, and answers with a
88+
mechanical verdict the agent must obey - if it doesn't improve, it goes.
89+
90+
```
91+
[tally #7 | gbm_depth3: rmse = 2.412 | best: glm_gamma = 2.380 | flat: 2/8 -> DISCARD]
92+
```
93+
8694
4. **Refine** - the winner's features are iterated one change at a time
8795
until the stopping rules call convergence.
8896
5. **Verify** - machine-checked constraints run against every final model;
@@ -91,12 +99,16 @@ Every run walks the same six stages, and you hold the pen at stage 2:
9199
plots, all in the run directory.
92100

93101
Two kinds of dial control how long this takes. The *statistical* stopping
94-
rules (H2O-style names) are applied by the agent: `stopping_rounds`
95-
consecutive attempts without improvement end an iteration, and gains below
96-
`stopping_tolerance` don't count. The *mechanical* budgets are enforced in
97-
code and cannot be talked past: after `max_steps` code executions or
98-
`max_runtime` seconds, the execution tool refuses to run anything more and
99-
the agent must finalise with what it has.
102+
rules (H2O-style names) run through the tally: `stopping_rounds`
103+
consecutive attempts without improvement end an iteration, gains below
104+
`stopping_tolerance` don't count, and atlas does the counting - the tally
105+
verdict tells the agent, in so many words, when the rule has triggered.
106+
The *mechanical* budgets are enforced in code and cannot be talked past:
107+
after `max_steps` code executions or `max_runtime` seconds, the execution
108+
tool refuses to run anything more and the agent must finalise with what it
109+
has. A finished session that is out of budget refuses further `$tell()`
110+
calls before any tokens are spent - grant more explicitly with
111+
`res$session$add_budget(steps = 25)`.
100112

101113
## Constraints
102114

@@ -136,6 +148,16 @@ res <- atlas(claims, "severity",
136148
test_prop = 0.2) # the ungameable judge
137149
138150
res$test_leaderboard # held-out performance, best first
151+
res$tally # every attempt: KEEP / DISCARD, best-so-far
152+
```
153+
154+
Autonomous doesn't mean unreachable: steer a running build from any other
155+
R session or terminal, and the message reaches the agent at its next step
156+
as its highest-priority instruction:
157+
158+
```{r}
159+
atlas_message("~/atlas-runs/severity",
160+
"focus on the gamma GLM family; stop trying trees")
139161
```
140162

141163
Long runs stay affordable: past a token budget (`compact_at`) the

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,40 @@ Every run walks the same six stages, and you hold the pen at stage 2:
7373

7474
1. **Explore** - dimensions, types, missingness, the outcome’s
7575
distribution; automatic leakage screening.
76+
7677
2. **Plan, then stop for you** - candidate families matched to the
7778
outcome’s distribution, a validation scheme, suggested monotone
7879
constraints. Approval is a conversation: whatever you type is folded
7980
into the plan.
81+
8082
3. **Build** - up to `n_models` candidates, compared on held-out data.
83+
Every model and tweak is scored the moment it is evaluated: atlas
84+
keeps a live tally, compares against the best so far, and answers
85+
with a mechanical verdict the agent must obey - if it doesn’t
86+
improve, it goes.
87+
88+
[tally #7 | gbm_depth3: rmse = 2.412 | best: glm_gamma = 2.380 | flat: 2/8 -> DISCARD]
89+
8190
4. **Refine** - the winner’s features are iterated one change at a time
8291
until the stopping rules call convergence.
92+
8393
5. **Verify** - machine-checked constraints run against every final
8494
model; violations trigger repair rounds.
95+
8596
6. **Document** - report, leaderboard, reproducible script, validation
8697
plots, all in the run directory.
8798

8899
Two kinds of dial control how long this takes. The *statistical*
89-
stopping rules (H2O-style names) are applied by the agent:
100+
stopping rules (H2O-style names) run through the tally:
90101
`stopping_rounds` consecutive attempts without improvement end an
91-
iteration, and gains below `stopping_tolerance` don’t count. The
92-
*mechanical* budgets are enforced in code and cannot be talked past:
93-
after `max_steps` code executions or `max_runtime` seconds, the
94-
execution tool refuses to run anything more and the agent must finalise
95-
with what it has.
102+
iteration, gains below `stopping_tolerance` don’t count, and atlas does
103+
the counting - the tally verdict tells the agent, in so many words, when
104+
the rule has triggered. The *mechanical* budgets are enforced in code
105+
and cannot be talked past: after `max_steps` code executions or
106+
`max_runtime` seconds, the execution tool refuses to run anything more
107+
and the agent must finalise with what it has. A finished session that is
108+
out of budget refuses further `$tell()` calls before any tokens are
109+
spent - grant more explicitly with `res$session$add_budget(steps = 25)`.
96110

97111
## Constraints
98112

@@ -133,6 +147,16 @@ res <- atlas(claims, "severity",
133147
test_prop = 0.2) # the ungameable judge
134148

135149
res$test_leaderboard # held-out performance, best first
150+
res$tally # every attempt: KEEP / DISCARD, best-so-far
151+
```
152+
153+
Autonomous doesn’t mean unreachable: steer a running build from any
154+
other R session or terminal, and the message reaches the agent at its
155+
next step as its highest-priority instruction:
156+
157+
``` r
158+
atlas_message("~/atlas-runs/severity",
159+
"focus on the gamma GLM family; stop trying trees")
136160
```
137161

138162
Long runs stay affordable: past a token budget (`compact_at`) the

_pkgdown.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ reference:
3535
- atlas
3636
- atlas_session
3737
- atlas_resume
38+
- atlas_message
3839

3940
- title: Domain knowledge
4041
desc: >

docs/articles/atlas.html

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/atlas.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,22 @@ agent must finalise from what it has.
118118

119119
``` r
120120

121-
res # print: leaderboard, constraint status, report
121+
res # print: leaderboards, tally, constraints, report, cost
122122
res$models # named list of fitted models
123123
predict(res$models[[1]], head(mtcars))
124124
res$leaderboard # validation metric per model, best first
125+
res$tally # every attempt the agent made: KEEP / DISCARD
125126
res$report # markdown: how each model was built, and why
126127
res$constraints # compliance table (if constraints were set)
127128
cat(res$code, sep = "\n\n") # the full script the agent ran
128129
res$dir # the run directory holding all of the above
129130
```
130131

132+
`res$tally` is the run’s ledger: one row per model or tweak the agent
133+
evaluated, scored live by atlas against the best so far and answered
134+
with a mechanical KEEP or DISCARD verdict - changes that didn’t improve
135+
on current performance were reverted on the spot.
136+
131137
One element deserves special mention: `res$session` is the live session
132138
object, with the full conversation still in context. Anything you would
133139
ask a colleague who just built these models, you can ask it:
@@ -136,6 +142,8 @@ ask a colleague who just built these models, you can ask it:
136142

137143
res$session$tell("why did the refined model beat the original?")
138144
res$session$tell("build one more candidate that uses at most 3 predictors")
145+
146+
res <- res$session$results() # results are snapshots: refresh after changes
139147
```
140148

141149
Sessions also survive R itself - see

docs/articles/autonomous.html

Lines changed: 44 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)