π The --run_program_once
parameter
The parameter
run_program_once
π allows you to run a shell command or script once before your actual program starts.Use it to:
- βοΈ install dependencies
- π download datasets
- π§Ή prepare folders
- π§ configure environments
bash /absolute/path/to/install.sh
or
bash relative/path/to/install.sh
The path is relative to your current pwd when starting this job.
π Example: install.sh
Hereβs an example install.sh
you might call with run_program_once
:#!/bin/bash
echo "Installing dependencies..."
pip install -r requirements.txt
echo "Downloading dataset..."
wget https://example.com/dataset.zip
unzip dataset.zip -d ./data
echo "Done β
"
π‘ Tips
- This runs once per experiment, not per trial.
- Great for setup work you donβt want repeated.
- You can call any Bash-compatible command or script.