async def monitor(self): while True: await asyncio.sleep(self.sleep_time) all_tasks = self.get_all_task_names() ray.show_in_webui(str(len(all_tasks)), key="Number of concurrent task runing") ray.show_in_webui(str(dict(Counter(all_tasks))), key="Concurrent tasks")
def f(self): ray.show_in_webui("test") return os.getpid()
def echo(_): time.sleep(0.01) # Sleep for 10ms ray.show_in_webui(str(serve.context.batch_size), key="Current batch size") return ["hi {}".format(i) for i in range(serve.context.batch_size)]