Skip to content

Commit 84343c4

Browse files
committed
merging master
2 parents c5c0f77 + 3627ee6 commit 84343c4

File tree

198 files changed

+11512
-774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+11512
-774
lines changed

.github/workflows/ci-cpu-cpp.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI CPU - CPP Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
concurrency:
12+
group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
ci-cpu-cpp:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-latest, macOS-latest]
22+
steps:
23+
- name: Checkout TorchServe
24+
uses: actions/checkout@v2
25+
- name: Install libtorch - macOS
26+
if: matrix.os == 'macOS-latest'
27+
run: |
28+
brew install libtorch
29+
- name: Install dependencies
30+
run: |
31+
python ts_scripts/install_dependencies.py --environment=dev --cpp
32+
- name: Build
33+
run: |
34+
cd cpp && ./build.sh --install-dependencies

.github/workflows/kserve_cpu_tests.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929
with:
3030
python-version: 3.8
3131
architecture: x64
32+
- name: Install grpcurl
33+
run: |
34+
sudo curl -sSL https://github.com/fullstorydev/grpcurl/releases/download/v1.8.0/grpcurl_1.8.0_linux_x86_64.tar.gz | sudo tar -xz -C /usr/local/bin grpcurl
35+
sudo chmod +x /usr/local/bin/grpcurl
3236
- name: Checkout TorchServe
3337
uses: actions/checkout@v3
3438
- name: Checkout kserve repo
@@ -37,5 +41,5 @@ jobs:
3741
repository: kserve/kserve
3842
ref: v0.11.1
3943
path: kserve
40-
- name: Validate torchserve-kfs
44+
- name: Validate torchserve-kfs and Open Inference Protocol
4145
run: ./kubernetes/kserve/tests/scripts/test_mnist.sh

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ instances.yaml.backup
4141
## Models
4242
*.pt
4343
*.onnx
44+
45+
# cpp
46+
cpp/_build
47+
cpp/third-party

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
[submodule "third_party/google/rpc"]
22
path = third_party/google/rpc
33
url = https://github.com/googleapis/googleapis.git
4+
[submodule "cpp/third-party/llama.cpp"]
5+
path = cpp/third-party/llama.cpp
6+
url = https://github.com/ggerganov/llama.cpp.git
7+
[submodule "cpp/third-party/llama2.c"]
8+
path = cpp/third-party/llama2.c
9+
url = https://github.com/karpathy/llama2.c

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
include ts/frontend/model-server.jar
2+
include ts/cpp/bin/*
3+
include ts/cpp/lib/*
4+
include ts/cpp/resources/logging.config
25
include PyPiDescription.rst
36
include ts/configs/*
47
include ts/version.txt

benchmarks/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
The benchmarks measure the performance of TorchServe on various models and benchmarks. It supports either a number of built-in models or a custom model passed in as a path or URL to the .mar file. It also runs various benchmarks using these models (see benchmarks section below). The benchmarks are executed in the user machine through a python3 script in case of jmeter and a shell script in case of apache benchmark. TorchServe is run on the same machine in a docker instance to avoid network latencies. The benchmark must be run from within `serve/benchmarks`
44

5-
We currently support benchmarking with JMeter & Apache Bench. One can also profile backend code with snakeviz.
5+
We currently support benchmarking with JMeter, Apache Bench and Locust. One can also profile backend code with snakeviz.
66

77
* [Benchmarking with Apache Bench](#benchmarking-with-apache-bench)
88
* [Auto Benchmarking with Apache Bench](#auto-benchmarking-with-apache-bench)
99
* [Benchmarking and Profiling with JMeter](jmeter.md)
1010

11-
# Benchmarking with Apache Bench
11+
⚠️**Please Note**⚠️ In future we will deprecate Apache Bench in favor of locust.
12+
13+
# Benchmarking with Locust/Apache Bench
1214

1315
## Installation
1416

@@ -43,6 +45,8 @@ Refer [parameters section](#benchmark-parameters) for more details on configurab
4345

4446
`python benchmark-ab.py`
4547

48+
To switch between Apache Bench and Locust you can set the --benchmark-backend/-bb parameter to either "ab" or "locust".
49+
4650
### Run benchmark using a config file
4751
The config parameters can be provided using cmd line args and a config json file as well.
4852
This command will use all the configuration parameters given in config.json file.

0 commit comments

Comments
 (0)