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

Offline batch inference mode #82

Merged
merged 26 commits into from
Aug 20, 2024
Merged

Offline batch inference mode #82

merged 26 commits into from
Aug 20, 2024

Conversation

liPatrick
Copy link
Contributor

@liPatrick liPatrick commented Aug 14, 2024

Adds batching capabilities.
addresses issue: #68

Copy link
Contributor

@farzadab farzadab left a comment

Choose a reason for hiding this comment

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

Thanks Pat. Not sure if this PR was ready or not, but I left some comments.

ultravox/inference/base.py Outdated Show resolved Hide resolved
ultravox/inference/infer.py Outdated Show resolved Hide resolved
ultravox/inference/infer.py Outdated Show resolved Hide resolved
ultravox/tools/infer_tool.py Outdated Show resolved Hide resolved
ultravox/data/datasets.py Outdated Show resolved Hide resolved
@zqhuang211 zqhuang211 requested a review from juberti August 16, 2024 06:25
@liPatrick liPatrick changed the title Batch inference with dataloader Batch inference Aug 16, 2024
@liPatrick
Copy link
Contributor Author

Sorry for the few iterations. Ended up working out a batch implementation that doesn't use dataloader. This was because it was tricky to use dataloader effectively without introducing awkwardness in the dataprocessing in infer_tools, and function definitions for batch_infer.

ultravox/inference/infer.py Outdated Show resolved Hide resolved
ultravox/tools/infer_tool.py Outdated Show resolved Hide resolved
@farzadab
Copy link
Contributor

Thanks Patrick, looks good. Just a few minor comments.

@liPatrick liPatrick changed the title Batch inference Offline batch inference mode Aug 19, 2024
ultravox/data/datasets.py Outdated Show resolved Hide resolved
ultravox/inference/infer.py Outdated Show resolved Hide resolved
ultravox/tools/infer_tool.py Outdated Show resolved Hide resolved
ultravox/tools/infer_tool.py Outdated Show resolved Hide resolved
ultravox/tools/infer_tool.py Outdated Show resolved Hide resolved
ultravox/tools/infer_tool.py Outdated Show resolved Hide resolved
ultravox/tools/infer_tool.py Outdated Show resolved Hide resolved
ultravox/tools/infer_tool.py Outdated Show resolved Hide resolved
Copy link
Contributor

@farzadab farzadab left a comment

Choose a reason for hiding this comment

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

Looking much better after the other reviews!

I added some comments but they are mostly nit, so it's approved IMO.

ultravox/tools/infer_tool.py Outdated Show resolved Hide resolved
ultravox/tools/infer_tool.py Outdated Show resolved Hide resolved
@liPatrick liPatrick merged commit b2dc7f1 into main Aug 20, 2024
1 check passed
@farzadab farzadab deleted the patrick/batch-infer branch August 20, 2024 22:44
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.

4 participants