Skip to main content

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

pms_inference_engine-2.0.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

pms_inference_engine-2.0.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file pms_inference_engine-2.0.0.tar.gz.

File metadata

  • Download URL: pms_inference_engine-2.0.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for pms_inference_engine-2.0.0.tar.gz
Algorithm Hash digest
SHA256 55a3a307a5b9050c0771681fe6025c3dd06fd62f992390fb51ab9755fc8bcdd3
MD5 c54d3575ac2e5025ba0396d1ba80fb8b
BLAKE2b-256 902a3a28c5061dae4dd856bbf1ae5c2dad8648520721b4841b308bac6acbe2a9

See more details on using hashes here.

File details

Details for the file pms_inference_engine-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pms_inference_engine-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1d5028416f31ebcd2072f416ee7eed850991ee71f8e02f9cb3a2361b15cac7c
MD5 23b663751a4b0ea356f3d498695d7815
BLAKE2b-256 97e6f212b6881421b8260a53ab6f542f1a9e7466da445815bb396ae09123b843

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page