mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-19 20:23:41 +00:00
* fix imports * add ray-serve with Colossal-Infer tp * trivial: send requests script * add README * fix worker port * fix readme * use app builder and autoscaling * trivial: input args * clean code; revise readme * testci (skip example test) * use auto model/tokenizer * revert imports fix (fixed in other PRs)
16 lines
303 B
Python
16 lines
303 B
Python
import ray
|
|
import requests
|
|
|
|
|
|
@ray.remote
|
|
def send_query(text):
|
|
resp = requests.get("http://localhost:8000/?text={}".format(text))
|
|
return resp.text
|
|
|
|
|
|
test_sentence = "Introduce some landmarks in Beijing"
|
|
|
|
result = ray.get(send_query.remote(test_sentence))
|
|
print("Result returned:")
|
|
print(result)
|