open_llm_eval_prep.sh 747 B

12345678910111213141516171819202122232425
  1. # Copyright (c) Meta Platforms, Inc. and affiliates.
  2. # This software may be used and distributed according to the terms of the Llama 2 Community License Agreement.
  3. #!/bin/bash
  4. # Prompt the user for the EVAL_PATH
  5. read -p "Enter the asbolute path to the lm-evaluation-harness: " EVAL_PATH
  6. conda activate
  7. # Directory containing YAML files
  8. DIR="open_llm_leaderboard"
  9. # Check if the directory exists
  10. if [ ! -d "$DIR" ]; then
  11. echo "Error: Directory '$DIR' not found."
  12. exit 1
  13. fi
  14. # Iterate over YAML files in the directory and update them
  15. for YAML_FILE in "$DIR"/*.yaml
  16. do
  17. if [ -f "$YAML_FILE" ]; then
  18. sed -i 's|{\$EVAL_PATH}|'"$EVAL_PATH"'|g' "$YAML_FILE"
  19. echo "Updated $YAML_FILE with EVAL_PATH: $EVAL_PATH"
  20. fi
  21. done