transformers
deb7dcd9 - Fix AssistantTracker.is_active() returning False after activation with empty lists (#44524)

Commit
79 days ago
Fix AssistantTracker.is_active() returning False after activation with empty lists (#44524) fix: use identity check in AssistantTracker.is_active() After activation, _rendered_blocks and _generation_indices are set to list arguments which may be empty []. The previous truthiness check returned False for empty lists, incorrectly indicating the tracker was inactive. Use `is not None` instead to correctly distinguish between unset (None) and active-but-empty ([]) state. Signed-off-by: JiangNan <1394485448@qq.com>
Author
Parents
Loading