We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents da04bcd + 0cc67d6 commit e331265Copy full SHA for e331265
scripts/run_pytorch.sh
@@ -1,12 +1,13 @@
1
#!/bin/bash
2
-set -e
3
. ~/miniconda3/etc/profile.d/conda.sh
4
conda activate base
5
6
ALL_FILE=$(find *.md ! -name README.md)
7
TEMP_PY="temp.py"
8
CUDAS="nvidia"
9
+declare -i error_code=0
10
+
11
for f in $ALL_FILE
12
do
13
echo "Running pytorch example in $f"
@@ -27,9 +28,12 @@ do
27
28
else
29
sed -n '/^```python/,/^```/ p' < $f | sed '/^```/ d' > $TEMP_PY
30
python $TEMP_PY
31
+ error_code+=$?
32
33
if [ -f "$TEMP_PY" ]; then
34
rm $TEMP_PY
35
fi
36
37
done
38
39
+exit $error_code
0 commit comments