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.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 281b2b889d2a7b454d925d6e97059a971a5d06967137167df9b7b018433a5eb6 |
|
MD5 | e1c59625ace32839f893c1750dd2425f |
|
BLAKE2b-256 | 3295160dbbbd3b8c4a345a29a4ebdad6230e0f1d37c1e8626a8b2704b67ea738 |
Close
Hashes for pms_inference_engine-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70e010c0f48c46b4fdb421648698184c27c6d5b4e81bbc496275ba6f533dcea8 |
|
MD5 | 44bc0784b2e42588a980be2b70cc3d11 |
|
BLAKE2b-256 | 16053642072d7fac2277be26b8d512e35f9bb02a016c38fd9377e0ba9459ffcd |