Make Your Tasks Rerun-Safe
🔴 Red sticky = I need help. Put it up the moment you are stuck — an instructor will come to you.
🟢 Green sticky = I have done 1–4 and am moving on to the bonus work, and I am ready to help my table.
Everything on this page runs from your clone, with the environment active:
cd ~/yens-onboarding-2026
source .venv/bin/activate
Task: Make each array task skip work it has already done, then resubmit the same array and watch it finish in seconds.
A handful of your 100 will come back empty sooner or later — a node reboots, a task hits its time limit, the API times out. Rerunning the whole array to catch them wastes compute and, with a paid API, money.
Add the existence check to your script, then resubmit the array you just ran.
💡 Hint — one way to do it
# already done? skip — makes the array safe to resubmit after a partial failure
if output_path.exists():
print(f"{output_path} already exists — skipping")
sys.exit(0)
Nothing has been deleted, so every task should find its output and exit at once — the whole array finishing in seconds rather than minutes is the sign it worked.