Download _backup/scripts/run_formula.sh from TrendeX90/ca-cube: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/datasets/TrendeX90/ca-cube/resolve/main/_backup/scripts/run_formula.sh
- Command line
-
hf download hf://datasets/TrendeX90/ca-cube/_backup/scripts/run_formula.sh
-
curl -L -o run_formula.sh https://huggingface.co/datasets/TrendeX90/ca-cube/resolve/main/_backup/scripts/run_formula.sh
1.09 kB
| # Run the backend formula (github.com/Konuktor/trendex, core_ca.yaml) on a frozen hard-link snapshot of the CA cube, | |
| # so the weather stage can swap monthly/ underneath without disturbing it. Then push formula outputs to HF. | |
| set -euo pipefail | |
| SNAP=/root/trendex-ca/data/cube_formula | |
| rm -rf "$SNAP" && mkdir -p "$SNAP" | |
| cp -al /root/trendex-ca/data/cube/monthly "$SNAP/monthly" | |
| cp /root/trendex-ca/data/cube/cells.parquet /root/trendex-ca/data/cube/manifest.json "$SNAP/" | |
| cd /root/trendex && git pull -q && git log --oneline -1 | |
| cd backend | |
| export TRENDEX_CONFIG=core_ca.yaml | |
| echo "FORMULA_BUILD_START $(date -u +%T)" | |
| .venv/bin/python -m pipeline.build --cube "$SNAP" --out artifacts_ca --clean --jobs 20 | |
| echo "FORMULA_EXPORT_START $(date -u +%T)" | |
| TRENDEX_ARTIFACTS=artifacts_ca TRENDEX_EXPORT=export_ca/v1 .venv/bin/python scripts/30_export_static.py | |
| TRENDEX_ARTIFACTS=artifacts_ca .venv/bin/python scripts/35_export_frontend.py | |
| du -sh artifacts_ca export_ca/v1 export/ca/v1/fe || true | |
| python /root/trendex-ca/scripts/50_push_ca.py formula | |
| echo "FORMULA_DONE $(date -u +%T)" | |