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

Add streaming mode for Inferencer #315

Merged
merged 6 commits into from
Apr 6, 2020
Merged

Add streaming mode for Inferencer #315

merged 6 commits into from
Apr 6, 2020

Conversation

tanaysoni
Copy link
Contributor

@tanaysoni tanaysoni commented Apr 6, 2020

This PR adds a high-performance non-blocking streaming mode for large scale inference use cases. With this mode, the dicts parameter in Inferencer.inference_from_dicts() can optionally be a Python generator object that yields dicts, thus avoiding loading all dicts in memory. The inference_from_dicts() method would return a generator that yield inference predictions.

@tanaysoni tanaysoni requested a review from tholor April 6, 2020 09:11
Copy link
Member

@tholor tholor left a comment

Choose a reason for hiding this comment

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

Good work! Only minor comments on the docs.

examples/streaming_inference.py Outdated Show resolved Hide resolved
farm/infer.py Outdated Show resolved Hide resolved
@tanaysoni tanaysoni merged commit eafa854 into master Apr 6, 2020
@tanaysoni tanaysoni deleted the stream-inference branch April 6, 2020 14:56
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