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

[TextGeneration][Bug] Fix timer #1294

Merged
merged 4 commits into from
Oct 4, 2023
Merged

[TextGeneration][Bug] Fix timer #1294

merged 4 commits into from
Oct 4, 2023

Conversation

dsikka
Copy link
Contributor

@dsikka dsikka commented Oct 3, 2023

For this ticket: https://app.asana.com/0/1205229323407165/1205618233879512/f

Tested locally with gradio/non-gradio examples

@dsikka dsikka marked this pull request as ready for review October 3, 2023 20:22
@dsikka dsikka requested a review from bfineran October 3, 2023 20:24
Comment on lines +348 to +349
with self.new_timer_context(total_inference=False) as timer:
return timer
Copy link
Member

Choose a reason for hiding this comment

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

is this tested? just want to make sure it won't exit the context and leave with current not set (even if the timer object still exists)

Copy link
Member

Choose a reason for hiding this comment

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

This PR fixes my test case within gradio so I'll accept!

Copy link
Member

Choose a reason for hiding this comment

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

Right, I'm sure it will work, only question I had is if the current that is created will actually live beyond the context in this function

Copy link
Member

Choose a reason for hiding this comment

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

Good call, this is worth investigating in a followup

Copy link
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

This works with my test, thanks!
test.py

@mgoin mgoin merged commit 5d022a7 into main Oct 4, 2023
13 checks passed
@mgoin mgoin deleted the fix_timer branch October 4, 2023 12:53
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.

None yet

3 participants