summaryrefslogtreecommitdiff
path: root/annotate_pgns/GNUmakefile
blob: 29fd78d12a2ee1d02f40e86a3e763598929ee39b (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Packages just the NNUE training pipeline's Python driver + its
# dependencies (NOT the input PGN -- that's passed to
# run_nnue_pipeline.py's --pgn-glob at runtime, shipped separately) into
# a single tar.bz2 for copying to a rented GPU box. See docs/NNUE.md.
#
# Usage:
#   make -C annotate_pgns bundle
#   make -C annotate_pgns clean-bundle

BUNDLE := nnue_pipeline_bundle.tar.bz2

# This directory's own driver + everything it imports.
PIPELINE_FILES := \
	run_nnue_pipeline.py \
	extract_selfplay_positions.py \
	split_holdout.py \
	fit_k_and_label.py \
	quiet_filter_games.py \
	quiet_filter.py \
	quiet_common.py \
	build_training_tensors.py \
	nnue_feature_spec.py \
	nnue_model.py \
	nnue_train.py \
	export_nnue_weights.py \
	sample_egtb_positions.py

# quiet_common.py reaches into ../src/eval_tune for its SEE logic
# (tune_eval_dna.py's static_exchange_eval/has_hanging_material), and
# dna_diff.py parses ../src/eval.c at import time for the DNA term
# list -- all three are genuine runtime dependencies, not optional
# extras, even though they live outside this directory. See
# quiet_common.py's own docstring.
EXTERNAL_FILES := \
	../src/eval_tune/tune_eval_dna.py \
	../src/eval_tune/dna_diff.py \
	../src/eval.c

ALL_FILES := $(PIPELINE_FILES) $(EXTERNAL_FILES)

.PHONY: bundle clean-bundle

bundle: $(BUNDLE)

$(BUNDLE): $(ALL_FILES)
	tar -cjf $@ -C .. \
		$(addprefix annotate_pgns/,$(PIPELINE_FILES)) \
		$(patsubst ../%,%,$(EXTERNAL_FILES))
	@echo "Wrote $@ ($$(du -h $@ | cut -f1)) -- the input PGN is NOT" \
	      "included; pass it separately via run_nnue_pipeline.py's" \
	      "--pgn-glob on the rented box."

clean-bundle:
	rm -f $(BUNDLE)