File tree 6 files changed +37
-6
lines changed
6 files changed +37
-6
lines changed Original file line number Diff line number Diff line change 32
32
RATING_ONLY=" $1 "
33
33
shift
34
34
35
+ PYTHON_BIN=python3
36
+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
37
+ PYTHON_BIN=python
38
+ fi
39
+
35
40
# We're not really using gating, but the upload script expects them to be where gating would put them
36
41
# and using gating disables the export script from making extraneous selfplay data dirs.
37
42
USEGATING=1
@@ -67,7 +72,7 @@ cp -r "$GITROOTDIR"/python/selfplay "$DATED_ARCHIVE"
67
72
cd " $basedir " /scripts
68
73
while true
69
74
do
70
- time python3 ./summarize_old_selfplay_files.py " $basedir " /selfplay/ \
75
+ time ${PYTHON_BIN} ./summarize_old_selfplay_files.py " $basedir " /selfplay/ \
71
76
-old-summary-file-to-assume-correct " $basedir " /selfplay.summary.json \
72
77
-new-summary-file " $basedir " /selfplay.summary.json.tmp
73
78
mv " $basedir " /selfplay.summary.json.tmp " $basedir " /selfplay.summary.json
Original file line number Diff line number Diff line change 23
23
RATING_ONLY=" $1 "
24
24
shift
25
25
26
+
27
+ PYTHON_BIN=python3
28
+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
29
+ PYTHON_BIN=python
30
+ fi
31
+
26
32
# ------------------------------------------------------------------------------
27
33
28
34
mkdir -p " $BASEDIR " /modelstobetested
@@ -84,7 +90,7 @@ function uploadStuff() {
84
90
do
85
91
set +e
86
92
set -x
87
- python3 ./upload_model.py \
93
+ ${PYTHON_BIN} ./upload_model.py \
88
94
-run-name " $RUNNAME " \
89
95
-model-name " $RUNNAME " -" $NAME " \
90
96
-model-file " $TMPDST " /" $RUNNAME " -" $NAME " .bin.gz \
Original file line number Diff line number Diff line change 21
21
USEGATING=" $1 "
22
22
shift
23
23
24
+ PYTHON_BIN=python3
25
+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
26
+ PYTHON_BIN=python
27
+ fi
28
+
24
29
# ------------------------------------------------------------------------------
25
30
26
31
mkdir -p " $BASEDIR " /tfsavedmodels_toexport
@@ -64,7 +69,7 @@ function exportStuff() {
64
69
mkdir " $TMPDST "
65
70
66
71
set -x
67
- python3 ./export_model.py \
72
+ ${PYTHON_BIN} ./export_model.py \
68
73
-saved-model-dir " $SRC " /saved_model \
69
74
-export-dir " $TMPDST " \
70
75
-model-name " $NAMEPREFIX " " -" " $NAME " \
Original file line number Diff line number Diff line change 23
23
BATCHSIZE=" $1 "
24
24
shift
25
25
26
+ PYTHON_BIN=python3
27
+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
28
+ PYTHON_BIN=python
29
+ fi
30
+
26
31
# ------------------------------------------------------------------------------
27
32
28
33
OUTDIR=$( date " +%Y%m%d-%H%M%S" )
@@ -37,7 +42,7 @@ echo "Beginning shuffle at" $(date "+%Y-%m-%d %H:%M:%S")
37
42
38
43
# set -x
39
44
(
40
- time python3 ./shuffle.py \
45
+ time ${PYTHON_BIN} ./shuffle.py \
41
46
" $BASEDIR " /selfplay/ \
42
47
-expand-window-per-row 0.4 \
43
48
-taper-window-exponent 0.65 \
Original file line number Diff line number Diff line change 20
20
BATCHSIZE=" $1 "
21
21
shift
22
22
23
+ PYTHON_BIN=python3
24
+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
25
+ PYTHON_BIN=python
26
+ fi
27
+
23
28
GITROOTDIR=" $( git rev-parse --show-toplevel) "
24
29
25
30
basedir=" $( realpath " $BASEDIRRAW " ) "
@@ -42,7 +47,7 @@ cp -r "$GITROOTDIR"/python/selfplay "$DATED_ARCHIVE"
42
47
while true
43
48
do
44
49
rm -f " $basedir " /selfplay.summary.json.tmp
45
- time python3 ./summarize_old_selfplay_files.py " $basedir " /selfplay/ \
50
+ time ${PYTHON_BIN} ./summarize_old_selfplay_files.py " $basedir " /selfplay/ \
46
51
-old-summary-file-to-assume-correct " $basedir " /selfplay.summary.json \
47
52
-new-summary-file " $basedir " /selfplay.summary.json.tmp
48
53
mv " $basedir " /selfplay.summary.json.tmp " $basedir " /selfplay.summary.json
Original file line number Diff line number Diff line change 28
28
EXPORTMODE=" $1 "
29
29
shift
30
30
31
+ PYTHON_BIN=python3
32
+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
33
+ PYTHON_BIN=python
34
+ fi
35
+
31
36
GITROOTDIR=" $( git rev-parse --show-toplevel) "
32
37
33
38
# ------------------------------------------------------------------------------
65
70
exit 1
66
71
fi
67
72
68
- time python3 " $GITROOTDIR " /python/train.py \
73
+ time ${PYTHON_BIN} " $GITROOTDIR " /python/train.py \
69
74
-traindir " $BASEDIR " /train/" $TRAININGNAME " \
70
75
-datadir " $BASEDIR " /shuffleddata/current/ \
71
76
-exportdir " $BASEDIR " /" $EXPORT_SUBDIR " \
You can’t perform that action at this time.
0 commit comments