Skip to content

Commit 793d0a7

Browse files
authored
server: rename debug tags to match --cache-idle-slots naming (#22292)
1 parent 8bc492e commit 793d0a7

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

tools/server/server-context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ struct server_context_impl {
719719
return;
720720
}
721721
SLT_INF(slot, "%s", "saving idle slot to prompt cache\n");
722-
SLT_DBG(slot, "%s", "__TEST_TAG_CLEAR_IDLE_SLOT__\n");
722+
SLT_DBG(slot, "%s", "__TEST_TAG_CACHE_IDLE_SLOT__\n");
723723
slot.prompt_save(*prompt_cache);
724724
slot.prompt_clear(false);
725725
prompt_cache->update();
@@ -996,7 +996,7 @@ struct server_context_impl {
996996
params_base.cache_idle_slots = false;
997997
} else {
998998
SRV_INF("%s: idle slots will be saved to prompt cache and cleared upon starting a new task\n", __func__);
999-
SRV_DBG("%s", "__TEST_TAG_CLEAR_IDLE_ENABLED__\n");
999+
SRV_DBG("%s", "__TEST_TAG_CACHE_IDLE_SLOTS_ENABLED__\n");
10001000
}
10011001
}
10021002

tools/server/tests/unit/test_kv_keep_only_active.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_clear_and_restore():
4848
log = LogReader(server.log_path)
4949

5050
# verify feature is enabled
51-
assert "__TEST_TAG_CLEAR_IDLE_ENABLED__" in log.drain()
51+
assert "__TEST_TAG_CACHE_IDLE_SLOTS_ENABLED__" in log.drain()
5252

5353
res = server.make_request("POST", "/completion", data={
5454
"prompt": LONG_PROMPT,
@@ -59,7 +59,7 @@ def test_clear_and_restore():
5959
original_prompt_n = res.body["timings"]["prompt_n"]
6060

6161
# Slot 0 is the only slot with KV — should NOT be cleared
62-
assert "__TEST_TAG_CLEAR_IDLE_SLOT__" not in log.drain()
62+
assert "__TEST_TAG_CACHE_IDLE_SLOT__" not in log.drain()
6363

6464
# Launching slot 1 clears idle slot 0
6565
res = server.make_request("POST", "/completion", data={
@@ -68,7 +68,7 @@ def test_clear_and_restore():
6868
"cache_prompt": True,
6969
})
7070
assert res.status_code == 200
71-
assert "__TEST_TAG_CLEAR_IDLE_SLOT__" in log.drain()
71+
assert "__TEST_TAG_CACHE_IDLE_SLOT__" in log.drain()
7272

7373
# Re-send same prompt — should restore from cache-ram
7474
res = server.make_request("POST", "/completion", data={
@@ -86,7 +86,7 @@ def test_clear_and_restore():
8686
"cache_prompt": True,
8787
})
8888
assert res.status_code == 200
89-
assert "__TEST_TAG_CLEAR_IDLE_SLOT__" not in log.drain()
89+
assert "__TEST_TAG_CACHE_IDLE_SLOT__" not in log.drain()
9090

9191

9292
def test_disabled_with_flag():
@@ -96,7 +96,7 @@ def test_disabled_with_flag():
9696
log = LogReader(server.log_path)
9797

9898
# Feature should not be enabled
99-
assert "__TEST_TAG_CLEAR_IDLE_ENABLED__" not in log.drain()
99+
assert "__TEST_TAG_CACHE_IDLE_SLOTS_ENABLED__" not in log.drain()
100100

101101
res = server.make_request("POST", "/completion", data={
102102
"prompt": LONG_PROMPT,
@@ -112,4 +112,4 @@ def test_disabled_with_flag():
112112
"cache_prompt": True,
113113
})
114114
assert res.status_code == 200
115-
assert "__TEST_TAG_CLEAR_IDLE_SLOT__" not in log.drain()
115+
assert "__TEST_TAG_CACHE_IDLE_SLOT__" not in log.drain()

0 commit comments

Comments
 (0)