From 5d8ce23ac3d500b66061dc264abd4d34bc4f23fd Mon Sep 17 00:00:00 2001 From: Krishna Kumar Date: Tue, 25 Jun 2024 13:56:13 -0600 Subject: [PATCH] GitHub Actions workflow to test training GNS --- .github/workflows/train.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/train.yml diff --git a/.github/workflows/train.yml b/.github/workflows/train.yml new file mode 100644 index 0000000..48eb18c --- /dev/null +++ b/.github/workflows/train.yml @@ -0,0 +1,37 @@ +name: GNS Train and Test + +on: + 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: Train & Test + run: | + 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: Black check + run: | + conda install -c conda-forge black -y + black --check . \ No newline at end of file