mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
test(complexity_router): derive the warm-pick record key from the shared caller scope
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
a4db51b1a1
commit
16bf7efd41
1 changed files with 2 additions and 1 deletions
|
|
@ -3620,6 +3620,7 @@ class TestWarmAwarePick:
|
|||
import json
|
||||
import time as time_module
|
||||
|
||||
from litellm.litellm_core_utils.core_helpers import get_caller_scope
|
||||
from litellm.router_strategy.complexity_router.cache_warming.store import CacheWarmingStore
|
||||
from litellm.router_strategy.complexity_router.cache_warming.types import (
|
||||
CACHE_WARMING_RECORD_SCHEMA_VERSION,
|
||||
|
|
@ -3647,7 +3648,7 @@ class TestWarmAwarePick:
|
|||
auto_router_model_name="warm-router",
|
||||
)
|
||||
store = CacheWarmingStore(redis_cache=redis, auto_router_model_name="warm-router")
|
||||
key = store.record_key("warm-router", "hash-w", "warm-sess")
|
||||
key = store.record_key("warm-router", get_caller_scope(TestWarmAwarePick._kwargs()), "warm-sess")
|
||||
redis.hashes.setdefault(store.sessions_key(), {})[key] = json.dumps(record.model_dump())
|
||||
for model_group, stamp in warmth.items():
|
||||
redis.data[CacheWarmingStore.warmth_key(key, model_group)] = json.dumps(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue