github bentoml/BentoML v1.1.11
BentoML - v1.1.11

latest releases: v1.2.19, v1.2.18, v1.2.17...
6 months ago

Bug fixes

  • Fix streaming for long payloads on remote runners. It will now always yield text and follow SSE protocol. We also provide SSE utils:
import bentoml
from bentoml.io import SSE

class MyRunnable(bentoml.Runnable):
	@bentoml.Runnable.method()
	def streaming(self, text):
		yield "data: 1\n\n"
		yield "data: 12222222222222222222222222222\n\n"

runner = bentoml.Runner(MyRunnable)

svc = bentoml.Service("service", runners=[runner])

@svc.api()
def infer(text):
	result = 0
	async for it in runner.streaming.async_stream(text):
		payload = SSE.from_iterator(it)
		result += int(payload.data)
	return result

What's Changed

New Contributors

Full Changelog: v1.1.10...v1.1.11

Don't miss a new BentoML release

NewReleases is sending notifications on new releases.