Hydra yaml config #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GNS Train and Test | |
on: | |
workflow_run: | |
workflows: ["Build and Push to GHCR"] | |
types: | |
- completed | |
push: | |
pull_request: | |
jobs: | |
gns: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/geoelements/gns:config | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Wait for GHCR build | |
if: github.event_name == 'workflow_run' | |
run: | | |
echo "Build and Push to GHCR workflow completed, proceeding with GNS Train and Test" | |
TMP_DIR="./gns-sample" | |
DATASET_NAME="WaterDropSample" | |
git clone https://github.com/geoelements/gns-sample | |
mkdir -p ${TMP_DIR}/${DATASET_NAME}/models/ | |
mkdir -p ${TMP_DIR}/${DATASET_NAME}/rollout/ | |
DATA_PATH="${TMP_DIR}/${DATASET_NAME}/dataset/" | |
MODEL_PATH="${TMP_DIR}/${DATASET_NAME}/models/" | |
ROLLOUT_PATH="${TMP_DIR}/${DATASET_NAME}/rollout/" | |
pytest test/ | |
echo "Test paths: ${DATA_PATH} ${MODEL_PATH}" | |
ls | |
python -m gns.train | |
echo "Predict rollout" | |
ls ./gns-sample/WaterDropSample/models/ | |
- name: Run without waiting | |
if: github.event_name != 'workflow_run' | |
run: | | |
echo "Build and Push to GHCR not triggered, proceeding with GNS Train and Test" | |
TMP_DIR="./gns-sample" | |
DATASET_NAME="WaterDropSample" | |
git clone https://github.com/geoelements/gns-sample | |
mkdir -p ${TMP_DIR}/${DATASET_NAME}/models/ | |
mkdir -p ${TMP_DIR}/${DATASET_NAME}/rollout/ | |
DATA_PATH="${TMP_DIR}/${DATASET_NAME}/dataset/" | |
MODEL_PATH="${TMP_DIR}/${DATASET_NAME}/models/" | |
ROLLOUT_PATH="${TMP_DIR}/${DATASET_NAME}/rollout/" | |
pytest test/ | |
echo "Test paths: ${DATA_PATH} ${MODEL_PATH}" | |
python -m gns.train | |
- name: Black check | |
run: | | |
black --check . |