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.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pms_inference_engine-2.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pms_inference_engine-2.1.0.tar.gz
Algorithm Hash digest
SHA256 97e06a80a06465ab23d42d72e59c727a25fe0e93d2e33a0c501d0a12a3db481c
MD5 532b7b1e37006f9f040652f7d37d787b
BLAKE2b-256 8a6f05e7a2d3a6073b88372327f3d035c8ad5d954aaa36d00eeab730ef0953c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pms_inference_engine-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3325d6991a19e94c034b7bc27cf1e5a29a47ffc54e9b6e401d55bd5513e5e608
MD5 c10897d884e945947f2bf4cf08405ac6
BLAKE2b-256 5b94666fd0dd59dc42e6b2f2f14ee6e558a7fee6011547e3243458657bce67f8

See more details on using hashes here.

Supported by

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