Slackbot
02/09/2023, 3:05 PMYilun Zhang
02/09/2023, 4:24 PMrunner.init_local()
result = classify(input_series)
since classify
is essentially a function as well.
If your classify
function is async, you can do
runner.init_local()
result = await classify(input_series)
Lorenzo Nuti
02/10/2023, 10:00 AMfrom service import svc
for runner in svc.runners:
runner.init_local()
result = svc.apis["classify"].func([[5.9, 3, 5.1, 1]])
By doing this, I take advantage of the code of the service but not the input/output validation and casting defined in the API (in the code above for example the function takes a list as input instead of a ndarray).
Is there a way around this problem?
And if there is not, is it correct to use this code for batch predictions in production even though it is indicated as debugging code in the documentation?Yilun Zhang
02/10/2023, 4:16 PM