Skip to content

Add async callback #8105

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

Merged
merged 3 commits into from
Apr 25, 2025
Merged

Add async callback #8105

merged 3 commits into from
Apr 25, 2025

Conversation

chenmoneygithub
Copy link
Collaborator

Based on #8103, but instead of using the generator, we break down the code.


return async_wrapper

else:
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: we could remove this else condition


def _execute_start_callbacks(instance, fn, call_id, callbacks, args, kwargs):
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: since they are internal methods within with_callbacks, we don't need to add "_" prefix.

Copy link
Collaborator

@TomeHirata TomeHirata left a comment

Choose a reason for hiding this comment

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

Left some comments, otherwise LGTM

@okhat okhat merged commit 3751a9b into stanfordnlp:main Apr 25, 2025
3 checks passed
@chenmoneygithub chenmoneygithub deleted the code-breakdown branch April 25, 2025 21:48
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.

3 participants