Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(agent-eval): fix MemorySaver version compatibility issue #128

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

weekenthralling
Copy link
Contributor

@weekenthralling weekenthralling commented Dec 2, 2024

After langgraph-checkpoint>=2.0.5, MemorySaver introduced ExitStack to dynamically manage contexts. However, using the with keyword does not work as expected.

In MemorySaver, the__enter__method returns an ExitStack object, and ExitStack does not have a get_next_version method.

def __enter__(self) -> "MemorySaver":
        return self.stack.__enter__()

This leads to an error when calling graph.invoke, error message: "AttributeError: 'ExitStack' object has no attribute 'get_next_version'".

# AsyncPregelLoop
self.checkpointer_get_next_version = checkpointer.get_next_version

pyproject.toml Outdated Show resolved Hide resolved
@weekenthralling weekenthralling force-pushed the main branch 2 times, most recently from 55d7664 to 9049515 Compare December 2, 2024 06:39
@edwardzjl edwardzjl changed the title chore: fix agent_eval fix(eval): fix agent_eval Dec 2, 2024
@weekenthralling weekenthralling changed the title fix(eval): fix agent_eval chore(agent-eval): fix MemorySaver version compatibility issue Dec 2, 2024
@edwardzjl edwardzjl merged commit 7e86b63 into tablegpt:main Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants