Files
foxhunt/scripts/argo-precompute.sh
jgrusewski 8919eccbb9 cleanup: remove --bf16 flag from precompute scripts and Argo template
Binary no longer accepts --bf16 (single f32 format). Removed from:
- scripts/argo-precompute.sh
- infra/k8s/argo/precompute-features-template.yaml

PVC fxcache cleaned: deleted 2.4GB old bf16 cache from feature-cache-pvc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 20:05:58 +02:00

71 lines
1.9 KiB
Bash
Executable File

#!/usr/bin/env bash
# Pre-compute DQN features via Argo Workflows.
#
# Usage:
# ./scripts/argo-precompute.sh ES.FUT
# ./scripts/argo-precompute.sh ES.FUT --pool platform --watch
#
# Requires: argo CLI
set -euo pipefail
TEMPLATE="precompute-features"
POOL=""
DATA_DIR=""
MBP10_DIR=""
TRADES_DIR=""
OUTPUT_DIR=""
WATCH=false
usage() {
cat <<EOF
Usage: $(basename "$0") <symbol> [OPTIONS]
Options:
--pool <name> Node pool (default: ci-compile-cpu)
--data-dir <dir> OHLCV data dir (default: /data/futures-baseline)
--mbp10-dir <dir> MBP-10 data dir (default: /data/futures-baseline-mbp10)
--trades-dir <dir> Trades data dir (default: /data/futures-baseline-trades)
--output-dir <dir> Output dir (default: /data/feature-cache)
--watch Follow workflow logs after submission
-h, --help Show this help
EOF
exit 0
}
[[ $# -eq 0 ]] && { echo "Error: symbol argument required"; usage; }
[[ "$1" == "-h" || "$1" == "--help" ]] && usage
SYMBOL="$1"; shift
while [[ $# -gt 0 ]]; do
case $1 in
--pool) POOL="$2"; shift 2 ;;
--data-dir) DATA_DIR="$2"; shift 2 ;;
--mbp10-dir) MBP10_DIR="$2"; shift 2 ;;
--trades-dir) TRADES_DIR="$2"; shift 2 ;;
--output-dir) OUTPUT_DIR="$2"; shift 2 ;;
--watch) WATCH=true; shift ;;
-h|--help) usage ;;
*) echo "Unknown option: $1"; usage ;;
esac
done
CMD="argo submit -n foxhunt --from=wftmpl/$TEMPLATE"
CMD="$CMD -p symbol=$SYMBOL"
[[ -n "$POOL" ]] && CMD="$CMD -p node-pool=$POOL"
[[ -n "$DATA_DIR" ]] && CMD="$CMD -p data-dir=$DATA_DIR"
[[ -n "$MBP10_DIR" ]] && CMD="$CMD -p mbp10-dir=$MBP10_DIR"
[[ -n "$TRADES_DIR" ]] && CMD="$CMD -p trades-dir=$TRADES_DIR"
[[ -n "$OUTPUT_DIR" ]] && CMD="$CMD -p output-dir=$OUTPUT_DIR"
if $WATCH; then
CMD="$CMD --watch"
fi
echo "Submitting feature pre-compute workflow..."
echo " symbol: $SYMBOL"
[[ -n "$POOL" ]] && echo " pool: $POOL"
echo ""
eval "$CMD"