Skip to content

Run instances concurrently, for agents that wait on a network - #4

Open
DenisDrobyshev wants to merge 1 commit into
mainfrom
concurrent-instances
Open

Run instances concurrently, for agents that wait on a network#4
DenisDrobyshev wants to merge 1 commit into
mainfrom
concurrent-instances

Conversation

@DenisDrobyshev

Copy link
Copy Markdown
Member

Measuring what the benchmark exists for turned up the obstacle to doing it.

An episode is a chain of round-trips: a decision cannot start until the previous
one's outcome is known. That is 100 decisions on queueing, 60 on inventory,
energy and supply-chain, 40 on joint-pricing, about 5 on pricing where
the stock sells out early — roughly 325 model calls for one episode of every
task, and 5,200 for a modest run of eight instances by two episodes across all
six. Single file, that is around an hour and a half of a language model waiting.

Instances do not depend on each other, so they overlap. Against an agent with
8 ms of simulated latency per decision:

workers wall clock agent return
1 0.77s 5.4375
4 0.17s 5.4375
8 0.10s 5.4375

The returns are bit-identical because every seed is fixed before the pool starts
and rows are collected by index. A test pins that equality: the moment
concurrency moves a score, the scores stop being reproducible and this stops
being a benchmark.

Above one worker the agent argument is a factory rather than an instance, and
passing an instance is refused with the reason in the message. An agent driving
a language model holds the brief and its recent decisions for the episode it is
in; shared across threads that memory interleaves, and the failure would read as
a bad policy rather than as a bug.

Both READMEs gain the per-task call budget, so a run can be costed before it is
started rather than after.

Measuring what the benchmark exists for turned up the obstacle to doing it. An
episode is a chain of round-trips, because a decision cannot start until the
previous one's outcome is known: 100 of them on queueing, 60 on inventory,
energy and supply-chain, 40 on joint-pricing. One episode of every task is
about 325 model calls, and a modest run across all six is 5,200 — an hour and a
half of a language model waiting, single file.

Instances are independent, so they overlap. Eight workers against an agent with
8 ms of simulated latency: 0.77s to 0.10s, with the returns bit-identical,
because every seed is fixed before the pool starts and rows are collected by
index. A test pins that equality — the moment concurrency changes a score, the
scores stop being reproducible and this stops being a benchmark.

Above one worker the agent argument is a factory rather than an instance, and
passing an instance is refused with the reason. An agent driving a language
model keeps the brief and the recent decisions for the episode it is in; shared
across threads that memory interleaves, and the failure would look like a bad
policy rather than a bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant