Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

[TextGeneration][Bug] Fix timer#1294

Merged
mgoin merged 4 commits intomainfrom
fix_timer
Oct 4, 2023
Merged

[TextGeneration][Bug] Fix timer#1294
mgoin merged 4 commits intomainfrom
fix_timer

Conversation

@dsikka
Copy link
Copy Markdown
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

Comment thread src/deepsparse/transformers/engines/nl_decoder_engine.py Outdated
@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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants