Repository navigation
fix(learning): keep runtime vectors out of dropped batch items - #137
Merged
Merged
Conversation
A memory dropped because its derived source changed during the model call still carried the numpy embedding, so writing the batch result raised TypeError and failed the whole batch. Strip the vector in one helper used by both _apply paths that can see it. The other dropped paths run before embeddings are attached or hold no memory item. ARCHITECTURE: maintenance_batch_retries now retries on days 1, 3 and 7.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
学习批次弃项
derived memory changed or invisible把含 numpy_embedding的 item 写入dropped,序列化result_json时 TypeError,整批失败(embedding 配置开启时才触发)。改动
src/iris/learning.py:新增_dropped_memory,两条能看到向量的 dropped 路径都用它(含 feat(learning): 只有角色发言作证据的确认不加保留强度 #136 的SELF_ONLY_CONFIRMATION)。其余路径在附加 embedding 前执行,或 item 不是记忆。ARCHITECTURE.md:maintenance_batch_retries改为迁移 036 之后的第 1、3、7 天各一次。验证
tests/test_learning_dropped_serialization.py,先写失败测试复现(修复前 TypeError),另覆盖 20 条上限弃项。uv build通过。tests/test_persona_streaming.py::test_future_deadline_closes_stream_worker_and_preserves_shared_client,与本 PR 无关:在不含本改动的 origin/main 工作树上单独运行同样失败。