#!/bin/bash export SPACE="AIEnergyScore/launch-computation-example" echo "Attempting to run." # For each line in the requests dataset.... python /parse_requests.py | while read -r line; do # Read the name of the model and the experiment. IFS="," read backend_model experiment_name <<< "${line}" echo "Benchmarking Model: ${backend_model}, Task: ${experiment_name}" # Initialize the directory for output. now=$(date +%Y-%m-%d-%H-%M-%S) run_dir="./runs/${experiment_name}/${backend_model}/${now}" mkdir -p "$run_dir" echo "${experiment_name},${backend_model}" >> /attempts.txt # Let the benchmarking begin! optimum-benchmark --config-name "${experiment_name}" --config-dir /optimum-benchmark/examples/energy_star/ backend.model="${backend_model}" backend.processor="${backend_model}" hydra.run.dir="${run_dir}" 2> "${run_dir}/error.log" || echo "${experiment_name},${backend_model}" >> /failed_attempts.txt done echo "Finished; updating requests dataset and results dataset." python /create_results.py ./runs # Pausing space echo "Pausing space." python /pause_space.py echo "Done."