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

fix data racing due to mutable reference using deepcopy #1255

Merged
merged 2 commits into from
Aug 29, 2024
Merged

Conversation

xiezhq-hermann
Copy link
Collaborator

Motivation

Objects including BatchTokenIDOut and BatchEmbeddingOut hold mutable references to ongoing requests, which could cause data racing when the order of accesses are not strictly ordered.

Modifications

Using field to ensure list object is copied and deepcopy to remove all possible mutable references.

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

@merrymercy merrymercy merged commit 8153168 into main Aug 29, 2024
9 checks passed
@merrymercy merrymercy deleted the xiezhq branch August 29, 2024 01:57
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