Fernando Camargo
08/19/2024, 7:17 PMsubprocess.Popen(
[
"bentoml",
"serve",
"embedding.service:EmbeddingService",
"-p",
str(cls.port),
],
env=env,
)
It works to run the integration tests, but I can't debug inside the service's code and I'm afraid it will also impact test coverage metrics. I'm currently replacing a service that was implemented with Tornado with BentoML and they run the service as follows:
sock, port = bind_unused_port()
self.http_client = AsyncHTTPClient()
self.__port = port
self._test_env = ENV_TEST
self._app = make_app(self._test_env)
self.http_server = HTTPServer(self._app)
self.http_server.add_sockets([sock])
This way, the service runs from the same process. Is it possible to do something similar in BentoML?