diff --git a/.riahub/train_configs/train.yaml b/.riahub/train_configs/train.yaml index 9708533..d1a3a94 100644 --- a/.riahub/train_configs/train.yaml +++ b/.riahub/train_configs/train.yaml @@ -29,9 +29,8 @@ export: use_dynamo: true use_onnxsim: false model: - name: iq_tiny_cnn - params: - hidden_channels: 16 + name: VTCNN1 + params: {} optimization: loss: name: cross_entropy @@ -47,7 +46,8 @@ runtime: amp_enabled: false autocast_dtype: float32 checkpoint_every_n_epochs: 1 - component_modules: [] + component_modules: + - /opt/qmb/riahub/model/src/qmb/models/RadioML/VTCNN1.py device: auto epochs: 1 progress_bar: false diff --git a/.riahub/workflows/train.yaml b/.riahub/workflows/train.yaml index 527d977..7011d41 100644 --- a/.riahub/workflows/train.yaml +++ b/.riahub/workflows/train.yaml @@ -15,7 +15,7 @@ permissions: jobs: QMB-Training: - runs-on: "ubuntu-latest-2080" + runs-on: "whitehorse-p40-qmb" env: RIAHUB_BASE_URL: ${{ vars.RIAHUB_BASE_URL || secrets.RIAHUB_BASE_URL || '' }} QMB_OUTPUT_ROOT: "/opt/qmb/outputs" @@ -39,6 +39,71 @@ jobs: fi + - name: Download Selected Model + env: + RIAHUB_USER: ${{ secrets.QMBDEMO_USER }} + RIAHUB_TOKEN: ${{ secrets.QMBDEMO_TOKEN }} + run: | + set -euo pipefail + DEFAULT_BASE_URL="https://riahub.ai" + BASE_URL_SOURCE=${RIAHUB_BASE_URL:-$DEFAULT_BASE_URL} + BASE_URL_SOURCE="${BASE_URL_SOURCE%/}" + + build_base_candidates() { + local raw="$1" + if [[ "$raw" =~ ^https?:// ]]; then + echo "$raw" + if [[ "$raw" == http://* ]]; then + echo "https://${raw#http://}" + elif [[ "$raw" == https://* ]]; then + echo "http://${raw#https://}" + fi + return + fi + echo "https://$raw" + echo "http://$raw" + } + + REPO_PATH="/qoherent/qmb-mvp.git" + REL_PATH="src/qmb/models/RadioML/VTCNN1.py" + REF="db9dffb7d382993cf46f392c34a47e4cdd59585e" + DEST_PATH="/opt/qmb/riahub/model/src/qmb/models/RadioML/VTCNN1.py" + TMP_DIR=$(mktemp -d) + cleanup() { sudo rm -rf "$TMP_DIR"; } + trap cleanup EXIT + mapfile -t BASE_CANDIDATES < <(build_base_candidates "$BASE_URL_SOURCE") + CLONED=0 + for base in "${BASE_CANDIDATES[@]}"; do + base="${base%/}" + REPO_URL="${base}${REPO_PATH}" + AUTHED_URL=$(printf '%s' "$REPO_URL" | sed -E "s#^(https?://)#\\1${RIAHUB_USER}:${RIAHUB_TOKEN}@#") + echo "Cloning model repo from $REPO_URL" + sudo rm -rf "$TMP_DIR" + if sudo git clone --filter=blob:none --no-checkout "$AUTHED_URL" "$TMP_DIR"; then + CLONED=1 + break + fi + done + if [[ "$CLONED" -ne 1 ]]; then + echo "Failed to clone model repo using base URL candidates derived from: $BASE_URL_SOURCE" >&2 + exit 1 + fi + if ! command -v git-lfs >/dev/null 2>&1; then + sudo apt-get update -y + sudo apt-get install -y git-lfs + fi + sudo git -C "$TMP_DIR" lfs install --local || true + sudo git -C "$TMP_DIR" sparse-checkout init --no-cone + sudo git -C "$TMP_DIR" sparse-checkout set --no-cone -- "$REL_PATH" + sudo git -C "$TMP_DIR" fetch --depth=1 origin "$REF" + sudo git -C "$TMP_DIR" -c advice.detachedHead=false checkout FETCH_HEAD + sudo git -C "$TMP_DIR" lfs fetch origin --include="$REL_PATH" --exclude="" || true + sudo git -C "$TMP_DIR" lfs checkout || true + sudo mkdir -p "$(dirname "$DEST_PATH")" + sudo cp -f "$TMP_DIR/$REL_PATH" "$DEST_PATH" + sudo git -C "$TMP_DIR" remote remove origin || true + sudo git -C "$TMP_DIR" config --local --unset-all http.extraheader || true + - name: Checkout Training Dataset env: RIAHUB_USER: ${{ secrets.QMBDEMO_USER }} @@ -317,4 +382,4 @@ jobs: path: ${{ github.workspace }}/.riahub/artifacts/training if-no-files-found: warn -# committed at 2026-05-27T02:54:53.931581+00:00 +# committed at 2026-05-27T03:13:26.168613+00:00