[Some Info]
- currently supported request type:
request_content_type=application/json
[Instructions]
- save your model in
.joblibformat. Example:
from joblib import dump
your_model_artifact = {
"model": your_model,
# other metadata
"tokenizer": ...,
"quantization": ...,
...
}
dump(your_model_artifact, "MODEL_ARTIFACT_PATH.joblib")
- Create inference script
inference.pywith two functionsinput_fnandpredict_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
- Register model: run
deployaible register --name=MODLE_NAME --model_path=MODEL_ARTIFACT_PATH_JOBLIB --inference_path=INFERENCE_SCRIPT_PATH - Serve your model: run
deployaible serve --port=your_portYou will get a backend running onyour_port(default is 9000). A sample endpoint will belocalhost:9000/your_model_name/predict. - Test endpoint: run
curl -X POST -H "Content-Type: application/json" -d '{"data": ["val"]}' http://localhost:9100/GPT4/predict
- 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
-
models.py-initmethod needs to use model loader and allows torch/pickle/sklearn types -
model_manager.py- enforce Singleton pattern with right locking mechanisms (also need to change the test case) -
bugs:
AssertionError: write() before start_responsewhen go to predict page then go back -
Celery component: add
try/except KeyboardInterruptas a potential fix to continuing celery worker -
Kafka component: add APIs for submitting data to and listening result from kafka
python setup.py sdisttwine 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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.