Inference Engine for pms
Project description
pms-inference-engine
pms에서 사용하기 위한 inference engine입니다.
Install
pip install pms-inference-engine
Use
import pms_inference_engine as E
# processor type in engine
processor_type = "SleepAndPassProcessor"
# number of processor in engine
nprocessors = 4
# params for construct processor
processor_kwargs = {
"concurrency": 2,
"sleep_time": 0.1,
}
# create engine
engine = E.Engine(
processor_type=processor_type,
number_of_processors=nprocessors,
processor_kwargs=processor_kwargs,
)
# create queue for engine
dequeue = Queue()
enqueue = Queue()
# input data
for i in range(nframe):
dequeue.put(E.EngineIOData(i, np.zeros((10, 10))))
# add exit flag
# - if you don't add the exit flag, the engine will run forever
dequeue.put(None)
# run engine
engine.run(dequeue=dequeue, enqueue=enqueue)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pms_inference_engine-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b16e1501b430dea99c0c9f336d7efdb90d02af86fb0b85c127b1a9268afb99d |
|
MD5 | b6766159dfb239940aeee79fb5835bd6 |
|
BLAKE2b-256 | a12c01aab7bf85e46e12ec1975ec0f64b4bfd4c5751f99e932210e8efa42f8d9 |
Close
Hashes for pms_inference_engine-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64833178e5ac63c1beca35c47bec7f88549a8710233f12a1504f35dd5ab77e99 |
|
MD5 | 742179ed57c622fa0b0a579a3074d2f5 |
|
BLAKE2b-256 | 1394d07f109190356518855ce2d015a174f4d6c78b4e886fa5ad1b96dc4490b0 |