#!/bin/bash # s3-maze's verifier, in a fresh container built from this folder (environment_mode = # "separate"): reward 1 if the maze service's own record shows the agent's walk reached the exit # (grade.py has the rules). Reward 0 is written before anything is checked, so a crash of the # check also scores 0. Python runs isolated (-I -S): no module from the working directory, # PYTHON* variables or site hooks can change what it imports. Besides bash, python3 is the only # command this script runs. case $0 in */*) here=${0%/*} ;; *) here=. ;; esac export EXPECTED=${EXPECTED:-$here/expected.json} export VERIFIER_DIR=${VERIFIER_DIR:-/logs/verifier} [ -d "$VERIFIER_DIR" ] && [ ! -L "$VERIFIER_DIR/reward.txt" ] && echo 0 > "$VERIFIER_DIR/reward.txt" python3 -I -S "$here/grade.py" || true