File tree Expand file tree Collapse file tree 6 files changed +37
-6
lines changed
Expand file tree Collapse file tree 6 files changed +37
-6
lines changed Original file line number Diff line number Diff line change 3232RATING_ONLY=" $1 "
3333shift
3434
35+ PYTHON_BIN=python3
36+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
37+ PYTHON_BIN=python
38+ fi
39+
3540# We're not really using gating, but the upload script expects them to be where gating would put them
3641# and using gating disables the export script from making extraneous selfplay data dirs.
3742USEGATING=1
@@ -69,7 +74,7 @@ cp -r "$GITROOTDIR"/python/selfplay "$DATED_ARCHIVE"
6974 cd " $basedir " /scripts
7075 while true
7176 do
72- time python3 ./summarize_old_selfplay_files.py " $basedir " /selfplay/ \
77+ time ${PYTHON_BIN} ./summarize_old_selfplay_files.py " $basedir " /selfplay/ \
7378 -old-summary-file-to-assume-correct " $basedir " /selfplay.summary.json \
7479 -new-summary-file " $basedir " /selfplay.summary.json.tmp
7580 mv " $basedir " /selfplay.summary.json.tmp " $basedir " /selfplay.summary.json
Original file line number Diff line number Diff line change 2323RATING_ONLY=" $1 "
2424shift
2525
26+
27+ PYTHON_BIN=python3
28+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
29+ PYTHON_BIN=python
30+ fi
31+
2632# ------------------------------------------------------------------------------
2733
2834mkdir -p " $BASEDIR " /modelstobetested
@@ -84,7 +90,7 @@ function uploadStuff() {
8490 do
8591 set +e
8692 set -x
87- python3 ./upload_model.py \
93+ ${PYTHON_BIN} ./upload_model.py \
8894 -run-name " $RUNNAME " \
8995 -model-name " $RUNNAME " -" $NAME " \
9096 -model-file " $TMPDST " /" $RUNNAME " -" $NAME " .bin.gz \
Original file line number Diff line number Diff line change 2121USEGATING=" $1 "
2222shift
2323
24+ PYTHON_BIN=python3
25+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
26+ PYTHON_BIN=python
27+ fi
28+
2429# ------------------------------------------------------------------------------
2530
2631mkdir -p " $BASEDIR " /tfsavedmodels_toexport
@@ -64,7 +69,7 @@ function exportStuff() {
6469 mkdir " $TMPDST "
6570
6671 set -x
67- python3 ./export_model.py \
72+ ${PYTHON_BIN} ./export_model.py \
6873 -saved-model-dir " $SRC " /saved_model \
6974 -export-dir " $TMPDST " \
7075 -model-name " $NAMEPREFIX " " -" " $NAME " \
Original file line number Diff line number Diff line change 2323BATCHSIZE=" $1 "
2424shift
2525
26+ PYTHON_BIN=python3
27+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
28+ PYTHON_BIN=python
29+ fi
30+
2631# ------------------------------------------------------------------------------
2732
2833OUTDIR=$( date " +%Y%m%d-%H%M%S" )
@@ -37,7 +42,7 @@ echo "Beginning shuffle at" $(date "+%Y-%m-%d %H:%M:%S")
3742
3843# set -x
3944(
40- time python3 ./shuffle.py \
45+ time ${PYTHON_BIN} ./shuffle.py \
4146 " $BASEDIR " /selfplay/ \
4247 -expand-window-per-row 0.4 \
4348 -taper-window-exponent 0.65 \
Original file line number Diff line number Diff line change 2020BATCHSIZE=" $1 "
2121shift
2222
23+ PYTHON_BIN=python3
24+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
25+ PYTHON_BIN=python
26+ fi
27+
2328GITROOTDIR=" $( git rev-parse --show-toplevel) "
2429
2530basedir=" $( realpath " $BASEDIRRAW " ) "
@@ -42,7 +47,7 @@ cp -r "$GITROOTDIR"/python/selfplay "$DATED_ARCHIVE"
4247 while true
4348 do
4449 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/ \
4651 -old-summary-file-to-assume-correct " $basedir " /selfplay.summary.json \
4752 -new-summary-file " $basedir " /selfplay.summary.json.tmp
4853 mv " $basedir " /selfplay.summary.json.tmp " $basedir " /selfplay.summary.json
Original file line number Diff line number Diff line change 2828EXPORTMODE=" $1 "
2929shift
3030
31+ PYTHON_BIN=python3
32+ if [ ${OS} == " Windows_NT" ] && [ ! -z " ${CONDA_PYTHON_EXE} " ]; then
33+ PYTHON_BIN=python
34+ fi
35+
3136GITROOTDIR=" $( git rev-parse --show-toplevel) "
3237
3338# ------------------------------------------------------------------------------
6570 exit 1
6671fi
6772
68- time python3 " $GITROOTDIR " /python/train.py \
73+ time ${PYTHON_BIN} " $GITROOTDIR " /python/train.py \
6974 -traindir " $BASEDIR " /train/" $TRAININGNAME " \
7075 -datadir " $BASEDIR " /shuffleddata/current/ \
7176 -exportdir " $BASEDIR " /" $EXPORT_SUBDIR " \
You can’t perform that action at this time.
0 commit comments