Remove useless scheduling statements (#273)

* remove useless schedule

Signed-off-by: Spycsh <sihan.chen@intel.com>

* remove blank line

Signed-off-by: Spycsh <sihan.chen@intel.com>

---------

Signed-off-by: Spycsh <sihan.chen@intel.com>
This commit is contained in:
Sihan Chen
2024-06-11 11:51:42 +08:00
committed by GitHub
parent 60b1696530
commit 02c7baae2b
4 changed files with 0 additions and 45 deletions

View File

@@ -63,13 +63,7 @@ class ChatQnAService:
self.megaservice.flow_to(rerank, llm)
self.gateway = ChatQnAGateway(megaservice=self.megaservice, host="0.0.0.0", port=self.port)
async def schedule(self):
await self.megaservice.schedule(initial_inputs={"text": "What is the revenue of Nike in 2023?"})
result_dict = self.megaservice.result_dict
print(result_dict)
if __name__ == "__main__":
chatqna = ChatQnAService(host=MEGA_SERVICE_HOST_IP, port=MEGA_SERVICE_PORT)
chatqna.add_remote_service()
asyncio.run(chatqna.schedule())

View File

@@ -30,15 +30,7 @@ class CodeGenService:
self.megaservice.add(llm)
self.gateway = CodeGenGateway(megaservice=self.megaservice, host="0.0.0.0", port=self.port)
async def schedule(self):
await self.megaservice.schedule(
initial_inputs={"text": "Write a function that checks if a year is a leap year in Python."}
)
result_dict = self.megaservice.result_dict
print(result_dict)
if __name__ == "__main__":
chatqna = CodeGenService(host=MEGA_SERVICE_HOST_IP, port=MEGA_SERVICE_PORT)
chatqna.add_remote_service()
asyncio.run(chatqna.schedule())

View File

@@ -29,28 +29,7 @@ class CodeTransService:
self.megaservice.add(llm)
self.gateway = CodeTransGateway(megaservice=self.megaservice, host="0.0.0.0", port=self.port)
async def schedule(self):
await self.megaservice.schedule(
initial_inputs={
"text": """
### System: Please translate the following Golang codes into Python codes.
### Original codes:
'''Golang
\npackage main\n\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello, World!\");\n
'''
### Translated codes:
"""
}
)
result_dict = self.megaservice.result_dict
print(result_dict)
if __name__ == "__main__":
service_ochestrator = CodeTransService(host=MEGA_SERVICE_HOST_IP, port=MEGA_SERVICE_PORT)
service_ochestrator.add_remote_service()
asyncio.run(service_ochestrator.schedule())

View File

@@ -30,17 +30,7 @@ class DocSumService:
self.megaservice.add(llm)
self.gateway = DocSumGateway(megaservice=self.megaservice, host="0.0.0.0", port=self.port)
async def schedule(self):
await self.megaservice.schedule(
initial_inputs={
"text": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."
}
)
result_dict = self.megaservice.result_dict
print(result_dict)
if __name__ == "__main__":
docsum = DocSumService(host=MEGA_SERVICE_HOST_IP, port=MEGA_SERVICE_PORT)
docsum.add_remote_service()
asyncio.run(docsum.schedule())