Skip to content

Commit 5e4517d

Browse files
authored
Fetch test data from s3 instead of using git-lfs (#925)
* Fetch test data from s3 instead of using git-lfs, and save it in circleCI cache. * Use wget in tests.sh when preparing tests data (instead of aws sync) to allow retrieval of test data from s3 without aws configure + update onnx benchmark accordingly
1 parent eca43e1 commit 5e4517d

Some content is hidden

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

63 files changed

+102
-10600
lines changed

.circleci/config.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,18 @@ commands:
140140
- run:
141141
name: Build
142142
command: make -C opt all SHOW=1
143+
- restore_cache:
144+
keys:
145+
- v1.2-tests_data
143146
- run:
144147
name: Test
145148
command: |
146149
make -C opt test SHOW=1
147150
no_output_timeout: 20m
151+
- save_cache:
152+
paths:
153+
- tests/flow/test_data
154+
key: v1.2-tests_data
148155
- run:
149156
name: Package
150157
command: |
@@ -182,6 +189,9 @@ commands:
182189
name: Build for valgrind
183190
command: |
184191
make -C opt all VALGRIND=1 SHOW=1
192+
- restore_cache:
193+
keys:
194+
- v1.2-tests_data
185195
- run:
186196
name: Test with valgrind
187197
command: |
@@ -198,6 +208,9 @@ commands:
198208
- restore_cache:
199209
keys:
200210
- v1.2.5-deps-{{ checksum "get_deps.sh" }}-gpu
211+
- restore_cache:
212+
keys:
213+
- v1.2-tests_data-gpu
201214
- relocate-docker-storage
202215
- run:
203216
name: Build
@@ -215,6 +228,10 @@ commands:
215228
mkdir -p $HOME/tests
216229
docker run --gpus all -v $HOME/tests:/build/tests/flow/logs -it --rm redisai-gpu:latest-test
217230
no_output_timeout: 40m
231+
- save_cache:
232+
paths:
233+
- tests/flow/test_data
234+
key: v1.2-tests_data-gpu
218235
- store_artifacts:
219236
path: /home/circleci/tests
220237

@@ -331,6 +348,9 @@ jobs:
331348
name: Build for coverage
332349
command: |
333350
make -C opt all COV=1 SHOW=1
351+
- restore_cache:
352+
keys:
353+
- v1.2-tests_data
334354
- run:
335355
name: Test with coverage
336356
command: |

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,7 @@ dkms.conf
137137
.idea_modules/
138138

139139
# docs site
140-
site/
140+
site/
141+
142+
# test data
143+
tests/flow/test_data

tests/flow/onnx_benchmark.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import os
2-
1+
import subprocess
32
from RLTest import Env
43
from includes import *
54
import shutil
@@ -25,7 +24,6 @@ def handler(signum, frame):
2524
def _exit():
2625
# remove the logs that were auto generated by redis
2726
shutil.rmtree('logs', ignore_errors=True)
28-
print("from exit\n")
2927
sys.exit(1)
3028

3129

@@ -172,6 +170,13 @@ def run_bert():
172170
help='The number of parallel clients that send consecutive run requests per model')
173171
args = parser.parse_args()
174172

173+
if not os.path.isdir('tests/flow/test_data'):
174+
print("Downloading tests data from s3...")
175+
with open('tests/flow/test_data_files.txt') as f:
176+
for resource in f.readlines():
177+
subprocess.call(['wget', '-q', '-x', '-nH', '--cut-dirs=2', resource[:-1], '-P', 'tests/flow/test_data'])
178+
print("Done")
179+
175180
terminate_flag = 0
176181
print(f'Running ONNX benchmark on RedisAI, using {args.num_threads} working threads')
177182
env = Env(module='install-cpu/redisai.so',

tests/flow/test_data/Pads.bin

-32 Bytes
Binary file not shown.

tests/flow/test_data/__init__.py

Whitespace-only changes.

tests/flow/test_data/batchdim_mismatch.onnx

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/flow/test_data/batchdim_mismatch.pt

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/flow/test_data/bert-base-cased.onnx

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/flow/test_data/creditcard_10K.csv

Lines changed: 0 additions & 10001 deletions
This file was deleted.

tests/flow/test_data/creditcardfraud.pb

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)