open_llm_eval_prep.sh 582 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # Prompt the user for the EVAL_PATH
  3. read -p "Enter the asbolute path to the lm-evaluation-harness: " EVAL_PATH
  4. conda activate
  5. # Directory containing YAML files
  6. DIR="open_llm_leaderboard"
  7. # Check if the directory exists
  8. if [ ! -d "$DIR" ]; then
  9. echo "Error: Directory '$DIR' not found."
  10. exit 1
  11. fi
  12. # Iterate over YAML files in the directory and update them
  13. for YAML_FILE in "$DIR"/*.yaml
  14. do
  15. if [ -f "$YAML_FILE" ]; then
  16. sed -i 's|{\$EVAL_PATH}|'"$EVAL_PATH"'|g' "$YAML_FILE"
  17. echo "Updated $YAML_FILE with EVAL_PATH: $EVAL_PATH"
  18. fi
  19. done