ShannonAI / service-streamer

Boosting your Web Services of Deep Learning Applications.
Apache License 2.0
1.22k stars 187 forks source link

Worker_timeout #92

Open MuhammadKhalid3975 opened 2 years ago

MuhammadKhalid3975 commented 2 years ago

why worker timeout is a not parameter to ThreadedStreamer, my Object detection model takes 5 seconds to do inference on image and I want to increase it

cgr71ii commented 1 year ago

I've run into this problem as well. In case it helps someones, you can modify this timeout from the installation:

f=$(python -c 'import service_streamer as ss; print(ss.service_streamer.__file__)')
echo "$f"

# Modify variable `WORKER_TIMEOUT` from $f with the desired value
desired_value="60" # Modify this variable

cat "$f" | grep "^WORKER_TIMEOUT" # Current value

# Modify the file
sed -E -i "s/^WORKER_TIMEOUT = [0-9]+\$/WORKER_TIMEOUT = ${desired_value}/" "$f"
raphael-sch commented 1 year ago

you can do

import service_streamer
service_streamer.service_streamer.WORKER_TIMEOUT = 120

before importing the Streamer