Skip to content

fix context to have new object for each request#451

Merged
aniketmaurya merged 1 commit intomainfrom
aniket/fix-context-bug
Mar 12, 2025
Merged

fix context to have new object for each request#451
aniketmaurya merged 1 commit intomainfrom
aniket/fix-context-bug

Conversation

@aniketmaurya
Copy link
Copy Markdown
Collaborator

What does this PR do?

Fixes #450

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89%. Comparing base (08a9caa) to head (8b79448).
Report is 1 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #451   +/-   ##
===================================
  Coverage    89%    89%           
===================================
  Files        37     37           
  Lines      2153   2153           
===================================
  Hits       1909   1909           
  Misses      244    244           
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bhimrazy
Copy link
Copy Markdown
Collaborator

bhimrazy commented Mar 12, 2025

Great catch, @aniketmaurya! 🚀
I didn’t knew they behave differently.

# All elements in the list will refer to the same dictionary object.
contexts = [{}] * num_inputs  

# vs 

# Each element will refer to a different dictionary object.
contexts = [{} for _ in range(num_inputs)]

@aniketmaurya aniketmaurya merged commit ec10c15 into main Mar 12, 2025
21 checks passed
@aniketmaurya aniketmaurya deleted the aniket/fix-context-bug branch March 12, 2025 22:03
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.

Request context is not separated.

3 participants