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

Support streaming in truss predict #535

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

squidarth
Copy link
Collaborator

Summary

Support streaming in the truss predict command. Similarly to the baseten client, we solve this here by checking to see if chunked transfer-encoding has been set, and if so, returning a generator from the baseten predict function, and in the CLI, printing out the results.

Testing

@squidarth ➜ .../truss/truss/test_data/test_streaming_truss (sshanker/support-streaming-in-truss-predict) $ poetry run truss predict -d '{"a": "b"}'
? 🎮 Which remote do you want to connect to? sid-prod
01234

@squidarth squidarth requested review from bolasim and aspctu August 10, 2023 02:17
@squidarth squidarth merged commit e611803 into main Aug 10, 2023
@squidarth squidarth deleted the sshanker/support-streaming-in-truss-predict branch August 10, 2023 03:36
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