Coach-Warmup: die Review zuletzt waermen, ihr gehoert der einzige Slot
Mit OLLAMA_NUM_PARALLEL=1 gibt es einen Live-Slot, und er gehoert dem letzten Prompt; die Wiederherstellung grosser Prompts aus dem Cache ist nicht verlaesslich. Der Warmup endete mit dem Debrief-Prefix und klaute der Review den Slot: Review nach Debrief-Ping 402 s, nach Review-Ping 26 s. Also: debrief zuerst, review zuletzt.
This commit is contained in:
1 parent
ae9d6785ac
commit
10f0844bf9
2 files changed
+8
-3
No files matched your search
+6
-2
@@ -17,8 +17,12 @@ import { fetchFor } from './node-fetch.js';
|
||||
|
||||
const INTERVAL_MS = 30 * 60000;
|
||||
const TIMEOUT_MS = 10 * 60000;
|
||||
// The two kinds a chat actually runs day to day; `create` happens once per user and may pay cold.
|
||||
const KINDS = ['review', 'debrief'];
|
||||
// The two kinds a chat runs day to day; `create` happens once per user and may pay cold.
|
||||
// Review is deliberately LAST: with OLLAMA_NUM_PARALLEL=1 there is one live slot, it belongs
|
||||
// to whatever ran most recently, and the fallback restore from the prompt cache is not
|
||||
// reliable for large prompts — so the slot must end up holding the kind people actually use.
|
||||
// (Measured: a review right after a debrief ping took 402 s; right after a review ping, 26 s.)
|
||||
const KINDS = ['debrief', 'review'];
|
||||
|
||||
let running = false;
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@ test('warmup pings the compatible endpoint once per chat kind, with the real rul
|
||||
assert.equal(r.ok, true);
|
||||
assert.equal(seen.length, 2);
|
||||
const reviewPrefix = buildPromptParts('review', {}).system;
|
||||
assert.ok(seen[0].messages[0].content.endsWith(reviewPrefix), 'system message carries the byte-identical review rules');
|
||||
assert.ok(seen[1].messages[0].content.endsWith(reviewPrefix), 'review is warmed LAST, so the single live slot ends up holding it');
|
||||
assert.ok(seen[0].messages[0].content.endsWith(buildPromptParts('debrief', {}).system));
|
||||
assert.equal(seen[0].model, 'm1');
|
||||
|
||||
cfgStore.save({ provider: 'anthropic' });
|
||||
|
||||
Reference in new issue
Block a user