Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: inference API cleanup #233

Merged
merged 31 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f5a0862
feat: clean up inference, add validation checks
ishaansehgal99 Feb 6, 2024
8e7f6c3
feat: unknown arg parsing added
ishaansehgal99 Feb 6, 2024
8cc3f2e
feat: rename func
ishaansehgal99 Feb 6, 2024
b635109
fix: library version
ishaansehgal99 Feb 6, 2024
6208731
fix: formatting
ishaansehgal99 Feb 6, 2024
02d7ea9
Merge branch 'main' of https://github.com/Azure/kaito into Ishaan/cle…
ishaansehgal99 Feb 12, 2024
8d17577
fix: add some additional params
ishaansehgal99 Feb 12, 2024
d596437
Merge branch 'main' of https://github.com/Azure/kaito into Ishaan/cle…
ishaansehgal99 Feb 13, 2024
02189ba
fix: rename inference-api.py to support python naming
ishaansehgal99 Feb 13, 2024
549b1f7
Merge branch 'main' of https://github.com/Azure/kaito into Ishaan/cle…
ishaansehgal99 Feb 13, 2024
8dd38ac
fix: add tests
ishaansehgal99 Feb 13, 2024
b97712d
fix: remove
ishaansehgal99 Feb 13, 2024
82bdb97
fix: added comprehensive tests
ishaansehgal99 Feb 13, 2024
fcb3f7d
fix: typo
ishaansehgal99 Feb 13, 2024
fb3e7c2
fix: add git install
ishaansehgal99 Feb 14, 2024
7758ba0
fix: sed using bash
ishaansehgal99 Feb 14, 2024
77c7ed8
fix: add unit tests for cpp
ishaansehgal99 Feb 14, 2024
56cacc6
fix: need to rebuild models
ishaansehgal99 Feb 14, 2024
cfe9ac7
fix: makefile edit for unit tests
ishaansehgal99 Feb 15, 2024
29ddf2e
nit: add quotes
ishaansehgal99 Feb 15, 2024
f05f565
fix: pin torch version and increase e2e preset timeout
ishaansehgal99 Feb 15, 2024
2dd3ff4
Merge branch 'main' of https://github.com/Azure/kaito into Ishaan/cle…
ishaansehgal99 Feb 16, 2024
272f71c
Merge branch 'main' of https://github.com/Azure/kaito into Ishaan/cle…
ishaansehgal99 Feb 16, 2024
53eccf1
feat: update requirements
ishaansehgal99 Feb 19, 2024
f6ec3d3
fix: include rename in different PR
ishaansehgal99 Feb 19, 2024
b1638c3
Merge branch 'main' of https://github.com/Azure/kaito into Ishaan/cle…
ishaansehgal99 Feb 20, 2024
8133e02
nit: gpu change
ishaansehgal99 Feb 20, 2024
8527762
fix: phi-2 needs more memory
ishaansehgal99 Feb 21, 2024
0e428fd
fix: increase timeout
ishaansehgal99 Feb 21, 2024
e1a6e41
fix: increase timeout
ishaansehgal99 Feb 21, 2024
db7e010
Merge branch 'main' into Ishaan/clean-api
ishaansehgal99 Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
run: |
make unit-test

- name: Run inference api unit tests
run: |
make inference-api-e2e

- name: Upload Codecov report
uses: codecov/codecov-action@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ unit-test: ## Run unit tests.
go test -v $(shell go list ./pkg/... ./api/... | grep -v /vendor) -race -coverprofile=coverage.txt -covermode=atomic
go tool cover -func=coverage.txt

inference-api-e2e:
pip install -r presets/inference/text-generation/requirements.txt
pytest -o log_cli=true -o log_cli_level=INFO .

$(E2E_TEST):
(cd test/e2e && go test -c . -o $(E2E_TEST))

Expand Down
2 changes: 1 addition & 1 deletion docker/presets/tfs-onnx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN echo $VERSION > /workspace/tfs/version.txt
COPY kaito/presets/inference/${MODEL_TYPE}/requirements.txt /workspace/tfs/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

COPY kaito/presets/inference/${MODEL_TYPE}/inference-api.py /workspace/tfs/inference-api.py
COPY kaito/presets/inference/${MODEL_TYPE}/inference_api.py /workspace/tfs/inference_api.py

# Convert to ONNX Runtime
# RUN python convert_to_onnx.py ${MODEL_NAME}
Expand Down
4 changes: 2 additions & 2 deletions docker/presets/tfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8-slim
FROM python:3.10-slim

ARG WEIGHTS_PATH
ARG MODEL_TYPE
Expand All @@ -16,7 +16,7 @@ RUN echo $VERSION > /workspace/tfs/version.txt
COPY kaito/presets/inference/${MODEL_TYPE}/requirements.txt /workspace/tfs/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

COPY kaito/presets/inference/${MODEL_TYPE}/inference-api.py /workspace/tfs/inference-api.py
COPY kaito/presets/inference/${MODEL_TYPE}/inference_api.py /workspace/tfs/inference_api.py

# Copy the entire model weights to the weights directory
COPY ${WEIGHTS_PATH} /workspace/tfs/weights
182 changes: 0 additions & 182 deletions presets/inference/text-generation/inference-api.py

This file was deleted.

Loading
Loading