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

lib: Checkpoint pending writes whenever a node finishes #976

Merged
merged 9 commits into from
Jul 10, 2024

Conversation

nfcampos
Copy link
Contributor

@nfcampos nfcampos commented Jul 10, 2024

  • Whenever a node finishes, checkpoint pending writes
  • Use pending_writes at beginning of stream (where we deal with input writes?)
  • Add test for two concurrent nodes, the longer one fails, the shorter one isn't re-run on resume
  • in sqlite/aiosqlite savers read pending writes in get_tuple

writes: List[Tuple[str, Any]],
task_id: str,
) -> None:
raise NotImplementedError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we default this to running put_writes in executor or does that mess up the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, let's make consistent with the other methods

@nfcampos nfcampos marked this pull request as ready for review July 10, 2024 17:31
libs/langgraph/tests/test_pregel.py Outdated Show resolved Hide resolved
libs/langgraph/langgraph/pregel/__init__.py Show resolved Hide resolved
@nfcampos nfcampos merged commit dfb2ac3 into main Jul 10, 2024
27 checks passed
@nfcampos nfcampos deleted the nc/9jul/checkpoint-pending-writes branch July 10, 2024 21:28
@HoangNguyen689
Copy link

@nfcampos
Can I ask what the writes are used for?
I can't find any documents about it.

@bieschke
Copy link

put_writes and aput_writes were added with a NotImplementedError referencing langgraph 0.1.7

This is confusing because it appears this change was created well after 0.1.7...

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.

4 participants