MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / _RequestState

Class _RequestState

KVCOMM/llm/kvcomm_engine.py:645–672  ·  view source on GitHub ↗

Container tracking deferred mutations for a single request.

Source from the content-addressed store, hash-verified

643
644
645class _RequestState:
646 """Container tracking deferred mutations for a single request."""
647
648 def __init__(
649 self,
650 request_uid: str,
651 anchor_dict: Dict[str, Any],
652 anchor_len_dict: Dict[str, Any],
653 anchor_info_dict: Dict[str, Any],
654 weight_dict: Dict[str, Any],
655 anchors: Dict[str, Any],
656 global_anchor_info_dict: Dict[str, Any],
657 ):
658 self.request_uid = request_uid
659 self.anchor_dict = _ScopedDict(anchor_dict)
660 self.anchor_len_dict = _ScopedDict(anchor_len_dict)
661 self.anchor_info_dict = _ScopedDict(anchor_info_dict)
662 self.weight_dict = _ScopedDict(weight_dict)
663 self.anchors = _ScopedDict(anchors)
664 self.global_anchor_info = _ScopedDict(global_anchor_info_dict)
665
666 def commit(self) -> None:
667 self.anchor_dict.commit()
668 self.anchor_len_dict.commit()
669 self.anchor_info_dict.commit()
670 self.weight_dict.commit()
671 self.anchors.commit()
672 self.global_anchor_info.commit()
673
674
675class KVCOMMEngine:

Callers 1

_get_request_stateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected