Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
408 commits
Select commit Hold shift + click to select a range
35affa7
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
prashantsail Jun 19, 2020
5643e8d
updated file name in script
prashantsail Jun 19, 2020
7629ad3
register unregister scenario
prashantsail Jun 19, 2020
7bcacb3
Updated TESTS md
prashantsail Jun 19, 2020
79dac3a
Merge pull request #8 from prashantsail/ps_performance
prashantsail Jun 19, 2020
0db993c
refactor
maheshambule Jun 19, 2020
4fd48cf
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
maheshambule Jun 19, 2020
69ddfbc
model description scenario
prashantsail Jun 19, 2020
e0776df
compare runs
maheshambule Jun 19, 2020
6b535b3
remove files
maheshambule Jun 19, 2020
07780b9
change in ini
maheshambule Jun 19, 2020
bee14d1
path name cahnge
maheshambule Jun 19, 2020
53a5747
Merge pull request #9 from maheshambule/test1
maheshambule Jun 19, 2020
7ac1cfc
list models scenario
prashantsail Jun 19, 2020
825f825
requirement.txt changes
maheshambule Jun 19, 2020
04b3661
boto3 req.txt
maheshambule Jun 19, 2020
e07c438
api description and health check scenario
prashantsail Jun 19, 2020
5ca9e96
Updated test plan names
prashantsail Jun 19, 2020
04442cf
Merge pull request #10 from prashantsail/ps_performance
prashantsail Jun 19, 2020
810cbb2
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
prashantsail Jun 19, 2020
9282f28
added missing threshold
prashantsail Jun 19, 2020
d44ed67
Merge pull request #11 from prashantsail/ps_performance
prashantsail Jun 19, 2020
9c25f8b
polished README.md
dhruvaray Jun 19, 2020
d1a7958
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
dhruvaray Jun 19, 2020
5b193b9
changes
maheshambule Jun 19, 2020
08c486b
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
maheshambule Jun 19, 2020
1dc558e
Update README.md
prashantsail Jun 19, 2020
51c7f01
folder
maheshambule Jun 19, 2020
b405877
fix issue
maheshambule Jun 19, 2020
667738e
Revert breaking changes
prashantsail Jun 19, 2020
4e99baf
Merge pull request #12 from prashantsail/ps_performance
prashantsail Jun 19, 2020
8e08348
fix write to comparision.csv
dhruvaray Jun 19, 2020
ecd7795
changes
maheshambule Jun 19, 2020
245f01c
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
maheshambule Jun 19, 2020
8d76098
remove empty run_artifacts dir, help change
dhruvaray Jun 19, 2020
8d960a5
minor fix for README.md
dhruvaray Jun 19, 2020
8ce37f4
temo fix for s3 upload in case there is no prior run.
dhruvaray Jun 19, 2020
e53b39d
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
prashantsail Jun 22, 2020
2ce6244
circleci integration with latest performance branch
prashantsail Jun 22, 2020
7d60fa0
fixed bug in computing reclaimed pids
dhruvaray Jun 22, 2020
cbcb190
tweaked for store_test_results
prashantsail Jun 22, 2020
0141c8a
tweaked for store_test_results
prashantsail Jun 22, 2020
c34fb0f
corrected indentation
prashantsail Jun 22, 2020
acf7c52
test with artifact dir in env var
prashantsail Jun 22, 2020
d007071
fix reclaim logic
dhruvaray Jun 22, 2020
3ca4ebd
Remove global variables
prashantsail Jun 22, 2020
d174415
python executeable
maheshambule Jun 22, 2020
629b0d6
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
maheshambule Jun 22, 2020
77a4f09
logger as 3rd parameter to get_metric
prashantsail Jun 22, 2020
7eba35e
Merge pull request #13 from prashantsail/ps_performance
prashantsail Jun 22, 2020
15ea39f
run perfomance suite
maheshambule Jun 22, 2020
f02cde6
Tweaked register/unregister to capture total processes
prashantsail Jun 22, 2020
d4aeae4
frontend's resident set size memory
prashantsail Jun 22, 2020
1f5be2b
revert changes to metrics module
prashantsail Jun 22, 2020
1003bea
add FDs count to reg_unreg scenario
prashantsail Jun 22, 2020
9592cf0
Merge pull request #14 from prashantsail/ps_performance
prashantsail Jun 22, 2020
a4c4072
fix bugs
Jun 22, 2020
37bfe46
revert changes
maheshambule Jun 22, 2020
bee28b7
Merge pull request #15 from maheshambule/perf_refactor
maheshambule Jun 22, 2020
b5a070a
dump metrics as tests are running, filter out the none stats from zom…
dhruvaray Jun 23, 2020
ac24c42
Start Stop MMS server in TCs
prashantsail Jun 23, 2020
06e6ae2
reg_unreg: avg-rt,
prashantsail Jun 23, 2020
5b506ed
enable logging of local metrics
prashantsail Jun 23, 2020
e3e3ffa
download kitten as part of tc
prashantsail Jun 23, 2020
032b548
reg\unreg with resent-18 preloaded
prashantsail Jun 23, 2020
194ac05
updated single inference
prashantsail Jun 23, 2020
e8a7e67
Updated inference multiple worker scenario
prashantsail Jun 23, 2020
43809a3
Updated inference single worker scenario
prashantsail Jun 23, 2020
3407096
Updated health check scenario
prashantsail Jun 23, 2020
37244e2
Updated API description scenario
prashantsail Jun 23, 2020
fc09154
Updated model description scenario
prashantsail Jun 23, 2020
7391d83
Updated list models scenario
prashantsail Jun 23, 2020
3b0e192
logging: True for all scenarios
prashantsail Jun 23, 2020
5837cff
corrected metric name
prashantsail Jun 23, 2020
d7dea3e
batch and
maheshambule Jun 23, 2020
e385593
fix
maheshambule Jun 23, 2020
0646d30
Updated scale up workers
prashantsail Jun 23, 2020
d4d7403
guard against zombie and recycled process
prashantsail Jun 23, 2020
77d1d37
Updated scale down scenario
prashantsail Jun 23, 2020
5bf2127
batch fixes
maheshambule Jun 23, 2020
6899de2
log collected
maheshambule Jun 23, 2020
1c4d82b
inference with multiple models scenario
prashantsail Jun 24, 2020
645a08c
Add scaleup to reg_unreg scenario clean up test
prashantsail Jun 24, 2020
696bafa
scale up\down linearinc\dec wokrer fd and memory
prashantsail Jun 24, 2020
a3d57c9
Merge pull request #16 from prashantsail/ps_performance
prashantsail Jun 24, 2020
c65b476
testmd batch
maheshambule Jun 24, 2020
217d7a4
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
maheshambule Jun 24, 2020
def9c2e
update batch scenarios for start\stop mms
prashantsail Jun 24, 2020
089fd72
Merge pull request #17 from prashantsail/ps_performance
prashantsail Jun 24, 2020
8ce6559
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
prashantsail Jun 24, 2020
4b8807b
environment separation
maheshambule Jun 24, 2020
19d4193
test suite movement
maheshambule Jun 24, 2020
6230213
added missing api_desc.jmx
prashantsail Jun 24, 2020
f9087f6
updated batch inference response time
prashantsail Jun 24, 2020
fc4d5cd
corrected health check variable values
prashantsail Jun 24, 2020
d15fe77
tweaked workers memory for scale up
prashantsail Jun 24, 2020
d305e96
comparison html and xml report
maheshambule Jun 24, 2020
fc68c77
Merge pull request #18 from prashantsail/ps_performance
prashantsail Jun 24, 2020
2f1bc44
updates to readme, examples, pull out worker name and change help of …
dhruvaray Jun 24, 2020
6d9b2bf
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
dhruvaray Jun 24, 2020
8f7e696
test suite movement
maheshambule Jun 24, 2020
6ab270c
test suite movement
maheshambule Jun 24, 2020
6d9b157
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
maheshambule Jun 24, 2020
5261b8b
handle env path
maheshambule Jun 24, 2020
4512f9d
renamed all dev_env1 to xlarge
prashantsail Jun 24, 2020
8f3bae9
Merge pull request #19 from prashantsail/ps_performance
prashantsail Jun 24, 2020
e89083f
api desc renamed vairables
prashantsail Jun 24, 2020
4070541
corrected variable name
prashantsail Jun 24, 2020
37525e5
change example name to be consistent... update readme for new report …
dhruvaray Jun 24, 2020
e70779c
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
dhruvaray Jun 24, 2020
5bf6396
updated variables in batch single infr scenario
prashantsail Jun 24, 2020
eb6e087
move section to improve clarity
dhruvaray Jun 24, 2020
3a089a3
updating and correcting var name and values batch_inference
prashantsail Jun 24, 2020
4f0631d
updated var names in health check scenario
prashantsail Jun 24, 2020
80f52d5
updated var names
prashantsail Jun 24, 2020
6d9d1e3
updated vars
prashantsail Jun 24, 2020
cc36927
updated vars
prashantsail Jun 24, 2020
4107a38
Updated vars
prashantsail Jun 24, 2020
9857375
updated vars
prashantsail Jun 24, 2020
a14924f
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
prashantsail Jun 24, 2020
604c998
Merge pull request #20 from prashantsail/ps_performance
prashantsail Jun 24, 2020
c4ca7d8
replace dev_env1 with xlarge
prashantsail Jun 24, 2020
c796b28
Merge pull request #21 from prashantsail/ps_performance
prashantsail Jun 24, 2020
fd3efaa
TOTAL_WORKERS_MEM to batch infer
prashantsail Jun 24, 2020
d09f29d
Merge pull request #22 from prashantsail/ps_performance
prashantsail Jun 24, 2020
21e964e
hacky glob to exclude examples by default
prashantsail Jun 24, 2020
bf4a032
Merge pull request #23 from prashantsail/ps_performance
prashantsail Jun 24, 2020
0873137
fix links to reflect new structure...
dhruvaray Jun 25, 2020
746bb0e
update README to put motivation section
dhruvaray Jun 25, 2020
b37ed3b
refactor README.md
dhruvaray Jun 25, 2020
dfa80a8
fix hard carriage return
dhruvaray Jun 25, 2020
4b5ef33
trigger build
prashantsail Jun 25, 2020
42215ca
refactoring code
maheshambule Jun 25, 2020
51f4fc8
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
maheshambule Jun 25, 2020
b44beef
test suite movement
maheshambule Jun 25, 2020
4fb5975
use os.path.join and misc refactoring
dhruvaray Jun 26, 2020
4440b92
pretty print summary
maheshambule Jun 26, 2020
eb1d999
Handle exceptions
prashantsail Jun 26, 2020
42eccec
tabulate support
maheshambule Jun 26, 2020
3c256a8
child process handling delegated to metrics module
prashantsail Jun 26, 2020
01b2ec4
for 5h without passfail criteria
prashantsail Jun 26, 2020
52887aa
monitor orphans as well
prashantsail Jun 26, 2020
d96338b
smoke and full builds
prashantsail Jun 26, 2020
42ac1db
matrix to dry config.yml
prashantsail Jun 26, 2020
8dbae22
correct parameter name
prashantsail Jun 26, 2020
05b856f
full suite trigger nightly
prashantsail Jun 26, 2020
420375b
correct yaml anchor and ref
prashantsail Jun 26, 2020
115e27d
Remove performance regression suite
prashantsail Jun 26, 2020
9211311
add build step before benchmark
prashantsail Jun 26, 2020
2eb9014
test for scheduled
prashantsail Jun 26, 2020
0189e12
[skip ci] no need of single worklfow
prashantsail Jun 26, 2020
ddbf83a
Tweaked TC for orphans
prashantsail Jun 26, 2020
2d2428b
Merge pull request #24 from prashantsail/performance
prashantsail Jun 26, 2020
c9f7fb0
path join and coloroma
maheshambule Jun 26, 2020
ec2055e
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
maheshambule Jun 26, 2020
34c5a78
os.path join
maheshambule Jun 26, 2020
f887dd0
termcolor
maheshambule Jun 26, 2020
b664860
skipped
maheshambule Jun 26, 2020
56cdaf6
replace _ with -
prashantsail Jun 26, 2020
8e5576c
test suite movement
maheshambule Jun 26, 2020
3f87c91
[skip ci] updated readme
prashantsail Jun 26, 2020
b909a06
[skip ci] updated readme
prashantsail Jun 26, 2020
9dad05a
show new console output
dhruvaray Jun 26, 2020
ddd33ba
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
dhruvaray Jun 26, 2020
e97caa4
test suite movement
maheshambule Jun 26, 2020
3cb778f
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
maheshambule Jun 26, 2020
f7c43cd
Do not crash on exception
prashantsail Jun 29, 2020
cf4bda9
Merge pull request #25 from prashantsail/performance
prashantsail Jun 29, 2020
b8874da
Updated readme
prashantsail Jun 29, 2020
00bd959
support for multiple job execution
prashantsail Jun 29, 2020
511a0ef
No need to remove .git
prashantsail Jun 29, 2020
9fd2233
Updated readme
prashantsail Jun 29, 2020
912108a
pylint score 9.78
prashantsail Jun 29, 2020
98d3e55
pylint score 10
prashantsail Jun 29, 2020
a1aae99
pylint score 10
prashantsail Jun 29, 2020
d7716cd
Merge pull request #12 from prashantsail/circleci-project-cli-tweaks
prashantsail Jun 29, 2020
dc1b6c4
multiple_inference_and_scaling
maheshambule Jun 30, 2020
ff8b7fd
rename
maheshambule Jun 30, 2020
cabf5d3
test suite movement
maheshambule Jun 30, 2020
3636634
test suite movement
maheshambule Jun 30, 2020
ffc2297
test suite movement
maheshambule Jun 30, 2020
468fb02
test suite movement
maheshambule Jun 30, 2020
22d036e
test suite movement
maheshambule Jun 30, 2020
9ffd9a5
change test criteria
maheshambule Jun 30, 2020
40c1c2f
increase delay
maheshambule Jun 30, 2020
5e45190
delay adjust
maheshambule Jun 30, 2020
7b35757
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
prashantsail Jun 30, 2020
66b7b6f
Merge branch 'circleci-project' of https://github.com/prashantsail/mu…
prashantsail Jun 30, 2020
e500ba1
trial execution
prashantsail Jun 30, 2020
8fbd815
trial execution
prashantsail Jun 30, 2020
0772db6
[skip ci] job rename, perf-regres...
prashantsail Jun 30, 2020
d060096
[skip ci] job rename, perf-regres...
prashantsail Jun 30, 2020
836e283
Added python shebang
prashantsail Jun 30, 2020
31b8179
update circleci config and script for new performance regression
prashantsail Jun 30, 2020
2326847
corrected script
prashantsail Jun 30, 2020
ffd4f26
Use installed jmeter
prashantsail Jun 30, 2020
8f520a9
comparision with s3
prashantsail Jun 30, 2020
94fcac5
trigger only one case
prashantsail Jun 30, 2020
0e25b5d
trigger
prashantsail Jun 30, 2020
8333aaa
performance regression on py27
prashantsail Jun 30, 2020
a320bcd
all performance scenarios,partially roll back changes to config.yml
prashantsail Jun 30, 2020
9107441
newman suite moved from test/ to tests/api
prashantsail Jun 30, 2020
3052a6e
updated config.yml for newman suite movement
prashantsail Jun 30, 2020
3a1fcc8
tests/api path correction
prashantsail Jun 30, 2020
44362d1
added ignored file
prashantsail Jun 30, 2020
2db4f4f
[skip ci] readme udpated for performance-regression suite
prashantsail Jul 1, 2020
7c3e6d8
shell scripts exit with error on main command fail
prashantsail Jul 1, 2020
6c51dd9
corrected config.yml
prashantsail Jul 1, 2020
1349478
exit on build fail
prashantsail Jul 1, 2020
5c33ca8
proper names to pytest results directory
prashantsail Jul 1, 2020
957b668
[skip ci] removed dev block
prashantsail Jul 1, 2020
e972390
add scenario for unregister when inference is in progress
prashantsail Jul 1, 2020
9b6e22f
rename xlarge to macos-xlarge
prashantsail Jul 1, 2020
452beff
Trigger all builds
prashantsail Jul 1, 2020
a8fdd33
renamed to macos_xlarge
prashantsail Jul 1, 2020
45bbff2
ci_linux_medium environment
prashantsail Jul 1, 2020
680aafc
handled space issues
prashantsail Jul 1, 2020
7081cdf
[skip ci] updated perf regression command for ci
prashantsail Jul 2, 2020
beb4302
api and bactch single scenario updated
prashantsail Jul 2, 2020
d5aeba0
remove comp_data from artifacts dir
maheshambule Jul 2, 2020
6b29ed6
tweaked thresholds for cci
prashantsail Jul 2, 2020
bc96274
tweaked thresholds for cci
prashantsail Jul 2, 2020
ba2b83b
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
prashantsail Jul 2, 2020
dab2d50
tweaked thresholds for circleci environment
prashantsail Jul 2, 2020
99687a3
performance regression only on py36
prashantsail Jul 2, 2020
96e40bd
performance regression only on py36
prashantsail Jul 2, 2020
b41186e
unregister while inferencing moved to examples
prashantsail Jul 2, 2020
8cf7620
tweaked thresholds for ci_linux_medium
prashantsail Jul 2, 2020
9d9cc6a
tweaked TCs
prashantsail Jul 2, 2020
c0be394
tweaked thresholds for circleci runs
prashantsail Jul 2, 2020
a97d9de
tweaked thresholds for circleci runs
prashantsail Jul 2, 2020
450bde2
Tweaked metric thresholds for circleci
prashantsail Jul 2, 2020
1b5a219
revert config.yaml to optimal config
prashantsail Jul 2, 2020
3eca7e5
Merge branch 'master' into performance
maaquib Jul 3, 2020
ca92cd1
Ps ci perf (#13)
prashantsail Jul 6, 2020
711a70c
Merge branch 'performance' of https://github.com/maheshambule/multi-m…
prashantsail Jul 6, 2020
ece60b1
API tests execute from tests/api directory
prashantsail Jul 8, 2020
6de300a
Psail test ci perf reg (#14)
prashantsail Jul 8, 2020
2b2e04c
Merge branch 'master' of https://github.com/awslabs/multi-model-serve…
prashantsail Jul 9, 2020
5687c2b
removed cruft
prashantsail Jul 9, 2020
fdc5d7d
renamed to macos_xlarge
prashantsail Jul 9, 2020
ec6dc02
Updated Readme
prashantsail Jul 9, 2020
fb927b9
corrected paths after movement from test to tests/api
prashantsail Jul 9, 2020
7868bf0
dev test triggger
prashantsail Jul 9, 2020
65549f3
updated thresholds for circlce ci
prashantsail Jul 9, 2020
63dd038
updated thresholds for circlce ci
prashantsail Jul 9, 2020
bcd948e
updated thresholds for circlce ci
prashantsail Jul 9, 2020
8098785
updated thresholds for circlce ci
prashantsail Jul 9, 2020
2bfb5a0
Revert dev test changes
prashantsail Jul 9, 2020
425f2c8
Renamed Job Step
prashantsail Jul 10, 2020
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
1 change: 1 addition & 0 deletions .circleci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Following _jobs_ are executed under each workflow -
3. **python-tests** : Executes pytests from _mms/tests/unit_tests/_
4. **benchmark** : Executes latency benchmark using resnet-18 model
5. (NEW!) **api-tests** : Executes newman test suite for API testing
6. (NEW!) **performance-regression** : Executes performance regression suite

Following _executors_ are available for job execution -
1. py27
Expand Down
52 changes: 38 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ commands:
- run:
name: Start MMS, Execute << parameters.collection >> API Tests, Stop MMS
command: .circleci/scripts/linux_test_api.sh << parameters.collection >>
- store_artifacts:
name: Store server logs from << parameters.collection >> API tests
path: mms_<< parameters.collection >>.log
- store_artifacts:
name: Store << parameters.collection >> API test results
path: test/<< parameters.collection >>-api-report.html
when: always


jobs:
Expand All @@ -57,7 +52,7 @@ jobs:
steps:
- checkout
- run:
name: Build frontend
name: Build MMS
command: .circleci/scripts/linux_build.sh
- store_artifacts:
name: Store gradle testng results
Expand All @@ -75,11 +70,12 @@ jobs:
steps:
- attach-mms-workspace
- run:
name: Execute python unit tests
name: Execute python lint and unit tests
command: .circleci/scripts/linux_test_python.sh
- store_artifacts:
name: Store python Test results
path: htmlcov
path: result_units
destination: units

api-tests:
parameters:
Expand All @@ -95,6 +91,9 @@ jobs:
collection: inference
- exeucute-api-tests:
collection: https
- store_artifacts:
name: Store server logs and test results
path: tests/api/artifacts/

benchmark:
parameters:
Expand All @@ -109,11 +108,31 @@ jobs:
command: .circleci/scripts/linux_test_benchmark.sh
- store_artifacts:
name: Store server logs from benchmark tests
path: mms.log
path: logs/
- store_artifacts:
name: Store Benchmark Latency resnet-18 results
path: /tmp/MMSBenchmark/out/latency/resnet-18/report/
destination: benchmark-latency-resnet-18
path: /tmp/MMSBenchmark

performance-regression:
parameters:
executor:
type: executor
executor: << parameters.executor >>
steps:
- attach-mms-workspace
- install-mms-server
- run:
name: Start MMS, Execute performance regression testcases, Stop MMS
command: .circleci/scripts/linux_test_perf_regression.sh
- store_artifacts:
name: Store server logs
path: tests/performance/logs/
- store_artifacts:
name: Store artifacts from performance regression run
path: tests/performance/run_artifacts/
- store_test_results:
name: Store performance regression test results for CircleCI
path: tests/performance/run_artifacts/report/

modelarchiver:
parameters:
Expand All @@ -123,11 +142,11 @@ jobs:
steps:
- checkout
- run:
name: Execute lint, unit and integration tests
name: Execute python lint, unit and integration tests
command: .circleci/scripts/linux_test_modelarchiver.sh
- store_artifacts:
name: Store unit tests results from model archiver tests
path: model-archiver/results_units
path: model-archiver/result_units
destination: units


Expand Down Expand Up @@ -187,3 +206,8 @@ workflows:
requires:
- build-<< matrix.executor >>
matrix: *matrix
- performance-regression:
name: performance-regression-<< matrix.executor >>
requires:
- build-<< matrix.executor >>
matrix: *matrix
75 changes: 55 additions & 20 deletions .circleci/scripts/linux_test_api.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#!/bin/bash

MODEL_STORE_DIR='test/model_store'
BASE_DIR="tests/api"
MODEL_STORE_DIR="model_store"

MMS_LOG_FILE_MANAGEMENT='mms_management.log'
MMS_LOG_FILE_INFERENCE='mms_inference.log'
MMS_LOG_FILE_HTTPS='mms_https.log'
MMS_CONFIG_FILE_HTTPS='test/resources/config.properties'
ARTIFACTS_BASE_DIR="artifacts"
ARTIFACTS_MANAGEMENT_DIR="$ARTIFACTS_BASE_DIR/management"
ARTIFACTS_INFERENCE_DIR="$ARTIFACTS_BASE_DIR/inference"
ARTIFACTS_HTTPS_DIR="$ARTIFACTS_BASE_DIR/https"

POSTMAN_ENV_FILE='test/postman/environment.json'
POSTMAN_COLLECTION_MANAGEMENT='test/postman/management_api_test_collection.json'
POSTMAN_COLLECTION_INFERENCE='test/postman/inference_api_test_collection.json'
POSTMAN_COLLECTION_HTTPS='test/postman/https_test_collection.json'
POSTMAN_DATA_FILE_INFERENCE='test/postman/inference_data.json'
MMS_CONSOLE_LOG_FILE="mms_console.log"
MMS_CONFIG_FILE_HTTPS="resources/config.properties"

REPORT_FILE_MANAGEMENT='test/management-api-report.html'
REPORT_FILE_INFERENCE='test/inference-api-report.html'
REPORT_FILE_HTTPS='test/https-api-report.html'
POSTMAN_ENV_FILE="postman/environment.json"
POSTMAN_COLLECTION_MANAGEMENT="postman/management_api_test_collection.json"
POSTMAN_COLLECTION_INFERENCE="postman/inference_api_test_collection.json"
POSTMAN_COLLECTION_HTTPS="postman/https_test_collection.json"
POSTMAN_DATA_FILE_INFERENCE="postman/inference_data.json"

REPORT_FILE="report.html"

start_mms_server() {
multi-model-server --start --model-store $1 >> $2 2>&1
Expand All @@ -29,45 +31,78 @@ start_mms_secure_server() {

stop_mms_server() {
multi-model-server --stop
sleep 10
}

cleanup_model_store(){
rm -rf $MODEL_STORE_DIR/*
}

move_logs(){
mv $1 logs/
mv logs/ $2
}

trigger_management_tests(){
start_mms_server $MODEL_STORE_DIR $MMS_LOG_FILE_MANAGEMENT
start_mms_server $MODEL_STORE_DIR $MMS_CONSOLE_LOG_FILE
newman run -e $POSTMAN_ENV_FILE $POSTMAN_COLLECTION_MANAGEMENT \
-r cli,html --reporter-html-export $REPORT_FILE_MANAGEMENT --verbose
-r cli,html --reporter-html-export $ARTIFACTS_MANAGEMENT_DIR/$REPORT_FILE --verbose
local EXIT_CODE=$?
stop_mms_server
move_logs $MMS_CONSOLE_LOG_FILE $ARTIFACTS_MANAGEMENT_DIR
cleanup_model_store
return $EXIT_CODE
}

trigger_inference_tests(){
start_mms_server $MODEL_STORE_DIR $MMS_LOG_FILE_INFERENCE
start_mms_server $MODEL_STORE_DIR $MMS_CONSOLE_LOG_FILE
newman run -e $POSTMAN_ENV_FILE $POSTMAN_COLLECTION_INFERENCE -d $POSTMAN_DATA_FILE_INFERENCE \
-r cli,html --reporter-html-export $REPORT_FILE_INFERENCE --verbose
-r cli,html --reporter-html-export $ARTIFACTS_INFERENCE_DIR/$REPORT_FILE --verbose
local EXIT_CODE=$?
stop_mms_server
move_logs $MMS_CONSOLE_LOG_FILE $ARTIFACTS_INFERENCE_DIR
cleanup_model_store
return $EXIT_CODE
}

trigger_https_tests(){
start_mms_secure_server $MODEL_STORE_DIR $MMS_LOG_FILE_HTTPS
start_mms_secure_server $MODEL_STORE_DIR $MMS_CONSOLE_LOG_FILE
newman run --insecure -e $POSTMAN_ENV_FILE $POSTMAN_COLLECTION_HTTPS \
-r cli,html --reporter-html-export $REPORT_FILE_HTTPS --verbose
-r cli,html --reporter-html-export $ARTIFACTS_HTTPS_DIR/$REPORT_FILE --verbose
local EXIT_CODE=$?
stop_mms_server
move_logs $MMS_CONSOLE_LOG_FILE $ARTIFACTS_HTTPS_DIR
cleanup_model_store
return $EXIT_CODE
}

mkdir -p $MODEL_STORE_DIR
cd $BASE_DIR
mkdir -p $MODEL_STORE_DIR $ARTIFACTS_MANAGEMENT_DIR $ARTIFACTS_INFERENCE_DIR $ARTIFACTS_HTTPS_DIR

case $1 in
'management')
trigger_management_tests
exit $?
;;
'inference')
trigger_inference_tests
exit $?
;;
'https')
trigger_https_tests
exit $?
;;
'ALL')
trigger_management_tests
MGMT_EXIT_CODE=$?
trigger_inference_tests
INFR_EXIT_CODE=$?
trigger_https_tests
HTTPS_EXIT_CODE=$?
# If any one of the tests fail, exit with error
if [ "$MGMT_EXIT_CODE" -ne 0 ] || [ "$INFR_EXIT_CODE" -ne 0 ] || [ "$HTTPS_EXIT_CODE" -ne 0 ]
then exit 1
fi
;;
*)
echo $1 'Invalid'
Expand Down
19 changes: 15 additions & 4 deletions .circleci/scripts/linux_test_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@

# Hack needed to make it work with existing benchmark.py
# benchmark.py expects jmeter to be present at a very specific location
mkdir -p /home/ubuntu/.linuxbrew/Cellar/jmeter/5.3/libexec/bin/
ln -s /opt/apache-jmeter-5.3/bin/jmeter /home/ubuntu/.linuxbrew/Cellar/jmeter/5.3/libexec/bin/jmeter
mkdir -p /home/ubuntu/.linuxbrew/Cellar/jmeter/5.3/libexec/
ln -s /opt/apache-jmeter-5.3/lib/ /home/ubuntu/.linuxbrew/Cellar/jmeter/5.3/libexec/lib
ln -s /opt/apache-jmeter-5.3/bin/ /home/ubuntu/.linuxbrew/Cellar/jmeter/5.3/libexec/bin

multi-model-server --start >> mms.log 2>&1
# Start MMS and redirect console ouptut and errors to a log file
multi-model-server --start >> mms_console.log 2>&1
sleep 30

cd benchmarks
python benchmark.py latency
EXIT_CODE=$?

multi-model-server --stop
multi-model-server --stop

# Moving MMS console log file to logs directory
# Just a convenience for CircleCI to pick up logs from one directory
cd ../
mv mms_console.log logs/

# Exit with the same error code as that of benchmark script
exit $EXIT_CODE
17 changes: 13 additions & 4 deletions .circleci/scripts/linux_test_modelarchiver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ cd model-archiver/

# Lint test
pylint -rn --rcfile=./model_archiver/tests/pylintrc model_archiver/.
PY_LINT_EXIT_CODE=$?

# Execute python unit tests
python -m pytest --cov-report html:results_units --cov=./ model_archiver/tests/unit_tests
python -m pytest --cov-report html:result_units --cov=./ model_archiver/tests/unit_tests
PY_UNITS_EXIT_CODE=$?


# Install model archiver module
pip install .
python setup.py bdist_wheel --universal && \
pip install dist/*.whl
MODL_ARCHVR_EXIT_CODE=$?

# Execute integration tests
python -m pytest model_archiver/tests/integ_tests
# ToDo - Report for Integration tests ?
python -m pytest model_archiver/tests/integ_tests # ToDo - Report for Integration tests ?
PY_INTEG_EXIT_CODE=$?

# If any one of the steps fail, exit with error
if [ "$PY_LINT_EXIT_CODE" -ne 0 ] || [ "$PY_UNITS_EXIT_CODE" -ne 0 ] || [ "$MODL_ARCHVR_EXIT_CODE" -ne 0 ] || [ "$PY_INTEG_EXIT_CODE" -ne 0 ]
then exit 1
fi
29 changes: 16 additions & 13 deletions .circleci/scripts/linux_test_perf_regression.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
#!/bin/bash

multi-model-server --start \
--models squeezenet=https://s3.amazonaws.com/model-server/model_archive_1.0/squeezenet_v1.1.mar \
>> mms.log 2>&1
sleep 90
ARTIFACTS_DIR='run_artifacts'
RESULT_DIR=$ARTIFACTS_DIR'/report/performance/'
JMETER_PATH='/opt/apache-jmeter-5.3/bin/jmeter'

cd performance_regression
cd tests/performance

# Only on a python 2 environment -
PY_MAJOR_VER=$(python -c 'import sys; major = sys.version_info.major; print(major);')
if [ $PY_MAJOR_VER -eq 2 ]; then
# Hack to use python 3.6.5 for bzt installation and execution
# While MMS continues to use system python which is at 2.7.x
export PATH="/root/.pyenv/bin:/root/.pyenv/shims:$PATH"
pyenv local 3.6.5
pyenv local 3.6.5 system
fi

# Install dependencies
pip install -r requirements.txt
pip install bzt

curl -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg
bzt -o modules.jmeter.path=/opt/apache-jmeter-5.3/bin/jmeter \
-o settings.artifacts-dir=/tmp/mms-performance-regression/ \
-o modules.console.disable=true \
imageInputModelPlan.jmx.yaml \
-report
# Execute performance test suite and store exit code
./run_performance_suite.py -j $JMETER_PATH -e ci_linux_medium -x example* --no-compare-local --no-monit
EXIT_CODE=$?

multi-model-server --stop
# Collect and store test results in result directory to be picked up by CircleCI
mkdir -p $RESULT_DIR
cp $ARTIFACTS_DIR/**/performance_results.xml $RESULT_DIR

# Exit with the same error code as that of test execution
exit $EXIT_CODE
9 changes: 8 additions & 1 deletion .circleci/scripts/linux_test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

# Lint Test
pylint -rn --rcfile=./mms/tests/pylintrc mms/.
PY_LINT_EXIT_CODE=$?

# Execute python tests
python -m pytest --cov-report html:htmlcov --cov=mms/ mms/tests/unit_tests/
python -m pytest --cov-report html:result_units --cov=mms/ mms/tests/unit_tests/
PYTEST_EXIT_CODE=$?

# If any one of the tests fail, exit with error
if [ "$PY_LINT_EXIT_CODE" -ne 0 ] || [ "$PYTEST_EXIT_CODE" -ne 0 ]
then exit 1
fi
Loading