agam1092005 commented on code in PR #585:
URL: https://github.com/apache/burr/pull/585#discussion_r2404016856
##########
burr/core/state.py:
##########
@@ -460,6 +498,18 @@ def __len__(self) -> int:
def __iter__(self) -> Iterator[Any]:
return iter(self._state)
+ def keys(self) -> StateKeysView:
+ """Returns a view of the state keys only (without values for cleaner
display).
+
+ This method addresses issue #409 by returning a custom view that
displays
+ only the keys when printed, making it usable even when state contains
+ large objects like embeddings or dataframes.
+
+ Returns:
+ StateKeysView: A view object that shows only keys in its string
representation
+ """
+ return StateKeysView(self._state.keys())
Review Comment:
Thanks for the feedback! The simpler approach is much better. Kindly check
latest commit...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]