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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76372561cb9d38ddb09184df72c33ef20f2d45d12b5402c3e5feaa36e2f7cae9 |
|
MD5 | e2296511c0c1476127521f8824317d34 |
|
BLAKE2b-256 | 6ae7b0e3bf41832caa434de9aae7505db7331ea8b418c6f8aca454ead3005959 |
Close
Hashes for pms_inference_engine-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f83d4adad477e94831868941d27f7adba7213b218a0172f513f96504e31f1f83 |
|
MD5 | b1851ef10ae92f2adbbeb30fb8059e9f |
|
BLAKE2b-256 | 02fc97513362adbba59ecbf9dc5e3443415a3bdc07552003e8938402545188de |