-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Actions workflow to test training GNS
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 . |