forked from luukboulogne/stoic2021-baseline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.bat
32 lines (25 loc) · 1.03 KB
/
test.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
call .\build.bat
docker volume create stoicalgorithm-output
docker run --rm --gpus all^
--memory=16g^
-v %~dp0\test\:/input/^
-v stoicalgorithm-output:/output/^
stoicalgorithm
docker run --rm^
-v stoicalgorithm-output:/output/^
python:3.7-slim cat /output/probability-covid-19.json | python -m json.tool
docker run --rm^
-v stoicalgorithm-output:/output/^
python:3.7-slim cat /output/probability-severe-covid-19.json | python -m json.tool
docker run --rm^
-v stoicalgorithm-output:/output/^
-v %~dp0\test\:/input/^
python:3.7-slim python -c "import json, sys; f1a = json.load(open('/output/probability-covid-19.json')); f2a = json.load(open('/input/expected_output-probability-covid-19.json')); f1b = json.load(open('/output/probability-severe-covid-19.json')); f2b = json.load(open('/input/expected_output-probability-severe-covid-19.json')); sys.exit((f1a != f2a)|(f1b != f2b));"
if %ERRORLEVEL% == 0 (
echo "Tests successfully passed..."
)
else
(
echo "Expected output was not found..."
)
docker volume rm stoicalgorithm-output