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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39ff4682d13b6b314154ea1c9bdd9075fd4bb6ce93cc39923e9bc1ac5343d620 |
|
MD5 | 70a0b848af1a68cfca4a5810d64b08d3 |
|
BLAKE2b-256 | 57b28e78e7a1cec81a942ac192c2043d8e661f236d6b9c6f0518dd851d6371c5 |
Close
Hashes for pms_inference_engine-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a38db48e36c9c5f368845b17ab2ea34a6d644f2f5b42c9dda59ad62bbb31e3f |
|
MD5 | 37d0f3e98ccff0649e716df22216d677 |
|
BLAKE2b-256 | 1bc66a59fac0a2fb3921f8b02ce9cc4342666a92f241d2b86d38b7b3e1a129f2 |