pms-inference-engine
pms에서 사용하기 위한 inference engine입니다.
Install
pip install pms-inference-engine
Use
import pms_inference_engine as E
processor_type = "SleepAndPassProcessor"
nprocessors = 4
processor_kwargs = {
"concurrency": 2,
"sleep_time": 0.1,
}
engine = E.Engine(
processor_type=processor_type,
number_of_processors=nprocessors,
processor_kwargs=processor_kwargs,
)
dequeue = Queue()
enqueue = Queue()
for i in range(nframe):
dequeue.put(E.EngineIOData(i, np.zeros((10, 10))))
dequeue.put(None)
engine.run(dequeue=dequeue, enqueue=enqueue)