Skip to main content

Introduction

This repo serves as a Model release template repo. This includes everything from onnx conversion up to model release into production with all nessasry configs.

Getting Started

To get started you need to fork this repo, and start going through it and fitting it to your use case as described below.

  1. Makefile
  2. Dependency management
  3. Configs
  4. Package code
  5. Onnx conversion
  6. Trt conversion
  7. Handlers
  8. Testing
  9. Flask app

1. Makefile

The makefile is the interface where developers interact with to perform any task. Below is the description of each command:

  • download-saved-model: Download artifacts stored on mlflow at a certain epoch. Make sure to fill configs/config.yaml

  • download-registered-model: Pull artifacts from model registry. Pass DEST as directory to store in. Make sure to fill configs/config.yaml

  • convert-to-onnx: Run convert to onnx script.

  • convert-trt: build & run container that performs trt conversion and yeild to artifacts/trt_converted. Pass FP(floating point) BS(batch size) DEVICE(gpu device) ONNX_PATH(path to onnx weights)

  • trt-exec: command to be executed from inside the trt container, perform the conversion and copies the model to outside container

  • predict-onnx: predict using onnx weights. Pass DATA_DIR(directory of data to be predicted) ONNX_PATH(path to onnx weights) CONFIG_PATH(Model config path) OUTPUT(output path directory)

  • predict-triton: predict by sending to a hosted triton server. Pass DATA_DIR(directory of data to be predicted) IP(ip of server) PORT(port of triton server) MODEL_NAME(model name on triton) CONFIG_PATH(Model config path) OUTPUT(output path directory)

  • evaluate: evaluate predicted results and write out metrics. Pass MODEL_PREDS(model predictions directory) GT(ground truth directory) OUTPUT(output path)

  • python-unittest: Run python tests defined.

  • bash-unittest: Run defined bash tests.

  • quick-host-onnx: setup triton folder structure by copying nessasarry files, then hosting a triton server container. Pass ONNX_PATH

  • quick-host-trt: setup triton folder structure by copying nessasarry files, then hosting a triton server container. Pass FP(floating point) BS(batch size) DEVICE(gpu device)

  • host-endpoint: preform quick-host-trt and build and start flask container. Pass FP(floating point) BS(batch size) DEVICE(gpu device)

  • setup-flask-app: command to be executed from inside the flask container.

  • push-model: push model to Model registry.

  • build-publish-pypi: build package folder into a pypi package and push the package to registry.

2. Dependency Management

Metadata

Release files for lpr-pkg 3.0.4

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

Source distribution (sdist)

Source distribution for lpr-pkg 3.0.4
File Size Uploaded
lpr_pkg-3.0.4.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lpr-pkg 3.0.4
File Interpreter ABI Platform
lpr_pkg-3.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 13.2 kB

Release files / lpr_pkg-3.0.4.tar.gz

Download URL lpr_pkg-3.0.4.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6794ac2364afb2d15f5a234bc84232c259d0b70b318cc41f2c9270efc2149608
BLAKE2b-256 checksum
How to use checksums
61ff20a6710f0e4336cc3bcd7c94bebed43f7bfdae11e4b9b1f7921f76e4f46e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.8.10 Linux/5.4.0-146-generic

Release files / lpr_pkg-3.0.4-py3-none-any.whl

Download URL lpr_pkg-3.0.4-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99366d95bd8f6144799b04ab055318a4e489f7104e253b88cc7a3c2cf16c05c0
BLAKE2b-256 checksum
How to use checksums
8da62f27f1bb7a89910f22d61c0059d3982b680cbb3369507912f3e953eb41ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.8.10 Linux/5.4.0-146-generic

Release history Release notifications | RSS feed

This release

3.0.4 This release

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

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