Commit e260982
fix: activation memory config crashes get_default() with OpenAI backend
Two bugs in `get_default_config()` / `get_default_cube_config()`:
1. `get_default_config()` injects `act_mem` dict into MOSConfig when
`enable_activation_memory=True`, but MOSConfig has no `act_mem` field
and inherits `extra="forbid"` from BaseConfig. This causes a
`ValidationError: Extra inputs are not permitted` for any user calling
`get_default()` with activation memory enabled.
2. `get_default_cube_config()` hardcodes `extractor_llm` backend to
`"openai"` for KV cache activation memory, but `KVCacheMemoryConfig`
validator requires `huggingface`/`huggingface_singleton`/`vllm`
(KV cache needs local model access for attention tensor extraction).
This causes `ConfigurationError` even if bug #1 is fixed.
Fix: Remove `act_mem` from MOSConfig dict (the `enable_activation_memory`
bool flag is sufficient). In MemCube config, require explicit
`activation_memory_backend` kwarg instead of hardcoding `"openai"`.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 5771273 commit e260982
1 file changed
+30
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
133 | 125 | | |
134 | 126 | | |
135 | 127 | | |
| |||
237 | 229 | | |
238 | 230 | | |
239 | 231 | | |
240 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
241 | 237 | | |
242 | 238 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
252 | 251 | | |
253 | | - | |
254 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
255 | 259 | | |
256 | 260 | | |
257 | 261 | | |
| |||
0 commit comments