Skip to content

Conversation

@KvanTTT
Copy link
Contributor

@KvanTTT KvanTTT commented Jan 2, 2026

It's especially useful for new users that aren't aware a lot about bash and cmake.

KvanTTT and others added 5 commits January 2, 2026 16:38
It's `python` on Windows and `python3` on Linux and macOS

fix lightvector#1142

(cherry picked from commit 945d1a5)
…pload_model_for_selfplay.sh`

To fix "find: -printf: unknown primary or operator" on macOS

fix lightvector#1144

(cherry picked from commit a10ff0d)
@KvanTTT KvanTTT force-pushed the script-and-cmake-fixes branch from 532faa4 to 51775cc Compare January 4, 2026 19:29
Copy link
Owner

@lightvector lightvector left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. Left some questions!

Comment on lines +28 to +33
if command -v python3 >/dev/null 2>&1; then
PYTHON=python3
else
PYTHON=python
fi

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good way to guard against the case where "python3" doesn't exist and "python" is "python2"? In that case it would probably be best to fail rather than attempt to run python-3 scripts.

mkdir "$TMPDST"

TOBEZIPPED="$TMPDST"/"$RUNNAME"-"$NAME"
TOBEZIPPED="$TMPDST/$RUNNAME-$NAME"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason for changing the quoting style on this and subsequent lines? Just a style thing or is there some other reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No particular reason, just a style thing (suggested by Junie AI assistance). I can rollback to make the changes minimal.

#to newer ones as they get generated.
echo "Cleaning up any old dirs"
find "$BASEDIR"/shuffleddata/ -mindepth 1 -maxdepth 1 -type d -mmin +120 | sort | head -n -5 | xargs --no-run-if-empty rm -r
find "$BASEDIR"/shuffleddata/ -mindepth 1 -maxdepth 1 -type d -mmin +120 -print0 | sort -z | head -z -n -5 | xargs -0 --no-run-if-empty rm -r
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does "-z" exist in MacOS as a flag for these commands? https://ss64.com/mac/sort.html doesn't list it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed it looks like macOS doesn't support the -z argument. However, I was able to run the script without problems on macOS, it's strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants