Files
leleka/scripts/e2e/decode/windowpolicy-install.sh
T
Pavlo RatushnyiandClaude Sonnet 5.5 dcf6e8bf5a window-policy: replay-arm policy options, floor options (default off), A/B and replay tools, harness ATTN_DAILY_MTP default, deploy env test
- AdaptiveConfig::set_option and the LELEKA_SPEC_ARMS suffix ~key=value (adaptive@0~step=0.3): policy variants inside one replay process on the same forced text
- options rowq / smooth / measured for the draft floor rule (defaults reproduce the earlier rule exactly, unit test against the kept reference)
- windowpolicy-replay.sh, -ab.sh (three arms), -analyze.py, -id.sh, -install.sh
- run-e2e.sh: LELEKA_SM120_ATTN_DAILY_MTP defaults to 1 like the rtx5090-32g profile
- deploy: the profile's engine_env reaches engine_environment() through the saved config (test)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 20:39:34 +01:00

36 lines
2.0 KiB
Bash

#!/usr/bin/env bash
# Install the window-policy A/B inputs on rnr5090 (run on the server from the directory that holds the scripts):
# bash windowpolicy-install.sh <repo scripts/e2e dir> [bin dir under dt/ ...]
# Copies the A/B tools to /data/leleka-e2e/window-policy/tools and the repository's scripts/e2e (run-e2e.sh and its client files) to /data/leleka-e2e/window-policy/scripts/e2e
# (read-only afterwards) and writes MANIFEST.sha256 with the digest of every input a run depends on: the tools, the e2e scripts, the draft-round harness helper,
# the binaries named on the command line, the long-session client, the upstream profile and the corpus manifest. windowpolicy-ab.sh refuses to start on a mismatch.
set -euo pipefail
WP=/data/leleka-e2e/window-policy
DRT=/data/leleka-e2e/draft-round/tools
D=/data/leleka-e2e/decode/dt
SRC=$(cd "$(dirname "$0")" && pwd)
E2E=$(cd "${1:?usage: windowpolicy-install.sh <scripts/e2e dir> [bin ...]}" && pwd)
shift
chmod -R u+w "$WP/tools" "$WP/scripts" 2>/dev/null || true
mkdir -p "$WP/tools"
for f in windowpolicy-ab.sh windowpolicy-analyze.py windowpolicy-replay.sh windowpolicy-replay-summary.py windowpolicy-id.sh windowpolicy-install.sh; do
if [ -e "$SRC/$f" ]; then install -m 0555 "$SRC/$f" "$WP/tools/$f"; fi
done
rm -rf "$WP/scripts"
mkdir -p "$WP/scripts/e2e"
for f in "$E2E"/*.sh "$E2E"/*.py; do
if [ -f "$f" ]; then install -m 0555 "$f" "$WP/scripts/e2e/$(basename "$f")"; fi
done
chmod a-w "$WP/tools" "$WP/scripts/e2e" "$WP/scripts"
{
sha256sum "$WP"/tools/* "$WP"/scripts/e2e/* "$DRT"/ts-wrap.sh
for b in "$@"; do
for x in leleka-inference leleka-daemon leleka-cli strata-next; do
sha256sum "$D/$b/$x"
done
done
sha256sum "$D/tools/long-session.py" /data/leleka-e2e/decode/assets/expert-profile-upstream.bin /data/leleka-e2e/decode/corpus/MANIFEST.txt
} >"$WP/MANIFEST.sha256.new"
mv "$WP/MANIFEST.sha256.new" "$WP/MANIFEST.sha256"
echo "installed; $(wc -l <"$WP/MANIFEST.sha256") inputs in $WP/MANIFEST.sha256"