Skip to main content

Core aiSSEMBLE Inference functionality

Project description

aiSSEMBLE Inference (OIP) Client

Provides a modular Python library for standardized ML model inference, promoting interoperability across diverse runtimes and platforms. This client allows invocation of OIP endpoints in a more natural manner by ensuring that inference runtime details (like tensor-specific input/output structures) as not leaked from the model implementation into the client.

Features

Fluent Builder API

InferenceBuilder (abstract base class) offers a task-specific, chainable interface for configuring inference requests. Supports model selection, adapter/translator registration, custom parameters, and streaming responses. Extensible via subclasses implementing build_predictor() to produce a Predictor instance.

Task-Specific Inference

The client provides specialized builders for common ML tasks with natural, task-oriented APIs:

Object Detection

  • client.detect_object(model_name) - Returns ObjectDetectionBuilder
  • Fluent methods: .image(), .confidence(), .labels()
  • Returns ObjectDetectionResult with bounding boxes, labels, scores
  • Supports PIL images, numpy arrays, file paths, and bytes
  • Example:
    result = client.detect_object("yolov8") \
        .image("photo.jpg") \
        .confidence(0.6) \
        .run()
    for detection in result.detections:
        print(f"{detection.label}: {detection.confidence}")
    

Text Summarization

  • client.summarize(model_name) - Returns SummarizationBuilder
  • Fluent methods: .text(), .max_length(), .min_length()
  • Returns SummarizationResult with summary text and compression metrics
  • Example:
    result = client.summarize("bart-large") \
        .text("Very long article text here...") \
        .max_length(100) \
        .run()
    print(result.summary)
    print(f"Compressed {result.compression_ratio:.1f}x")
    

Raw Inference Support

RawInferenceBuilder provides a low-level, non-fluent API for direct tensor inputs and parameters, ideal for custom or performance-critical scenarios.

Streaming Capable

Builders support iterable responses for continuous inference outputs.

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

aissemble_inference_core-1.5.0.tar.gz (260.7 kB view details)

Uploaded Source

Built Distribution

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

aissemble_inference_core-1.5.0-py3-none-any.whl (41.4 kB view details)

Uploaded Python 3

File details

Details for the file aissemble_inference_core-1.5.0.tar.gz.

File metadata

  • Download URL: aissemble_inference_core-1.5.0.tar.gz
  • Upload date:
  • Size: 260.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aissemble_inference_core-1.5.0.tar.gz
Algorithm Hash digest
SHA256 657b9a5a776e9798276f19bd452c42fe00d7e9be32c7bba54a7d4562589396ba
MD5 ab021e0f4bff4ffcb5c3c9ce8a5e72da
BLAKE2b-256 d93d9a57af9b422fef7d565d9586538dad1d3038345ac5f24a2ee9c58a193c7f

See more details on using hashes here.

File details

Details for the file aissemble_inference_core-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: aissemble_inference_core-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 41.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aissemble_inference_core-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d50257c03657d487397d61bede4c1dde8ed61e70857c5255c4130915dd90948
MD5 0f9d815a7080b6f61b7841967df9a158
BLAKE2b-256 2a30cbdb34591ad5c6b25d0c7905a1f8a9a2ee824829d3c1c7bb4c2277aef826

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