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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b324c03b05544aeeeb814497dbd326c26e41e1edc9da9f9642f007c3b58f8c60 |
|
MD5 | 9b0485775870d0d6d9a9530f3fba144c |
|
BLAKE2b-256 | 6879372b8bad779ef36f3b954aca897434d8f16901cff02575598d574b7f595b |
Close
Hashes for pms_inference_engine-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44a5940c76edd7b2bffdad59341d93fc333d290bffd4ac154e6542fd231e47f0 |
|
MD5 | 7b488bc3391b40f889579ada9dd597fe |
|
BLAKE2b-256 | a9eb7dbf6ffdc7995784a8b8ac92e6d9d2456d16c4ed0afd96cf41d9f178cd29 |