Skip to content

Commit

Permalink
Parameterize the run_batch.sh script (pyg-team#5253)
Browse files Browse the repository at this point in the history
* Parameterize the run_batch.sh script

Add bash defaults for the variables in the script.
Enables overriding the variable values on the commandline so the script
can easily reference different experiment, grid, etc values at runtime.

* Improve syntax of variable assignment

Use :- set default form instead of := variable assignment form since
values are explicitly assigning after default selection.
Drop quotes on values since they are simple strings.

Co-authored-by: Matthias Fey <[email protected]>
  • Loading branch information
jprorama and rusty1s authored Aug 23, 2022
1 parent 4f605d9 commit fc5c803
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions graphgym/run_batch.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env bash

CONFIG=example_node
GRID=example
REPEAT=3
MAX_JOBS=8
SLEEP=1
MAIN=main
CONFIG=${CONFIG:-example_node}
GRID=${GRID:-example}
REPEAT=${REPEAT:-3}
MAX_JOBS=${MAX_JOBS:-8}
SLEEP=${SLEEP:-1}
MAIN=${MAIN:-main}

# generate configs (after controlling computational budget)
# please remove --config_budget, if don't control computational budget
Expand Down

0 comments on commit fc5c803

Please sign in to comment.