Skip to main content

build docs lint codecov GitHub License commit

[Some Info]

  • currently supported request type: request_content_type=application/json

[Instructions]

  1. save your model in .joblib format. Example:
from joblib import dump

your_model_artifact = {
    "model": your_model,
    # other metadata
    "tokenizer": ...,
    "quantization": ...,
    ...
}

dump(your_model_artifact, "MODEL_ARTIFACT_PATH.joblib")
  1. Create inference script inference.py with two functions input_fn and predict_fn (similar to how sagemaker inference does). Usually you'll create an inference file for each model you register. Example:
def input_fn(data):
    processed_data_for_model_input = ...  # some transformation logic
    return processed_data_for_model_input

def predict_fn(input, model):
    result = model(input)
    return result
  1. Register model: run deployaible register --name=MODLE_NAME --model_path=MODEL_ARTIFACT_PATH_JOBLIB --inference_path=INFERENCE_SCRIPT_PATH
  2. Serve your model: run deployaible serve --port=your_port You will get a backend running on your_port (default is 9000). A sample endpoint will be localhost:9000/your_model_name/predict.
  3. Test endpoint: run
curl -X POST -H "Content-Type: application/json" -d '{"data": ["val"]}' http://localhost:9100/GPT4/predict
  1. You can also the APIs via swagger UI on http://localhost:your_port/docs

sample_notebook_placeholder

sample_architecture_placeholder

Highlights

  • Supports multiple types of model serving
  • Sample UI
  • Works on Linux/MacOS/Windows

Install

[TODO] git instruction or pip install instruction

Basic Usage

Advanced Usage

Misc

Performance

Documentation

[TODO] set up using this link

Bugs/Requests

License

TODO's

  1. models.py - init method needs to use model loader and allows torch/pickle/sklearn types

  2. model_manager.py - enforce Singleton pattern with right locking mechanisms (also need to change the test case)

  3. bugs: AssertionError: write() before start_response when go to predict page then go back

  4. Celery component: add try/except KeyboardInterrupt as a potential fix to continuing celery worker

  5. Kafka component: add APIs for submitting data to and listening result from kafka

  • python setup.py sdist
  • twine upload dist/*

Metadata

Release files for dpai 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dpai 0.1.0
File Size Uploaded Provenance Actions
dpai-0.1.0.tar.gz 22.5 kB Without provenance Details for dpai-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dpai 0.1.0
File Interpreter ABI Platform Actions
dpai-0.1.0-py3-none-any.whl Python 3 none any Details for dpai-0.1.0-py3-none-any.whl

Total release size: 41.2 kB

Release files / dpai-0.1.0.tar.gz

Download URL dpai-0.1.0.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
66235ca79b1c45fe53abbabc773ee550fca88f150815735ef30148f20f5a52a2
BLAKE2b-256 checksum
How to use checksums
33696f15cbc31d43f08009017bbffa643f00d61410c7dc6265e0a525869e28ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Release files / dpai-0.1.0-py3-none-any.whl

Download URL dpai-0.1.0-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f382655fccc56aa8ad1c049929f3d93a02bd134a32d4bffe3c9e24c03e4025da
BLAKE2b-256 checksum
How to use checksums
cfd82bce79f7b88c4a46bf48dc944a0ccb30d76b0c8ed0c238981b7b9085e8fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Security for dpai 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page