mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
refactor: Rename benchmark dir, improve rsync, fix problem stats
This commit is contained in:
parent
a75507980a
commit
4efdc8b4f7
4 changed files with 18 additions and 17 deletions
|
@ -1,10 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Create directories if they don't exist
|
||||
mkdir -p tmp.benchmark/exercism
|
||||
mkdir -p tmp.benchmarks/exercism
|
||||
|
||||
# Change to the exercism directory
|
||||
cd tmp.benchmark/exercism
|
||||
cd tmp.benchmarks/exercism
|
||||
|
||||
# List of languages to clone
|
||||
languages=("cpp" "go" "java" "javascript" "python" "rust")
|
||||
|
|
|
@ -49,11 +49,6 @@ fi
|
|||
|
||||
# Print success message and instructions
|
||||
echo "Docker installation completed successfully!"
|
||||
echo -e "\n*** IMPORTANT: Group changes require a complete session refresh."
|
||||
echo "Please run these commands in sequence:"
|
||||
echo "1. sudo systemctl restart docker"
|
||||
echo "2. exit"
|
||||
echo -e "Then log back in and docker commands should work without sudo\n"
|
||||
|
||||
# Start Docker service
|
||||
echo "Starting Docker service..."
|
||||
|
@ -66,8 +61,3 @@ docker --version
|
|||
|
||||
echo "Docker Compose version:"
|
||||
docker compose version
|
||||
|
||||
echo "Docker service status:"
|
||||
sudo systemctl status docker --no-pager
|
||||
|
||||
EOF
|
||||
|
|
|
@ -23,9 +23,12 @@ def get_dirs_from_leaderboard():
|
|||
def load_results(dirname):
|
||||
"""Load all result files from a benchmark directory"""
|
||||
dirname = Path(dirname)
|
||||
benchmark_dir = Path("tmp.benchmarks") / dirname
|
||||
|
||||
benchmark_dir = dirname
|
||||
if not benchmark_dir.exists():
|
||||
return None
|
||||
benchmark_dir = Path("tmp.benchmarks") / dirname
|
||||
if not benchmark_dir.exists():
|
||||
return None
|
||||
|
||||
all_results = []
|
||||
parse_errors = [] # Track which exercises had parse errors for this model
|
||||
|
@ -70,8 +73,11 @@ def analyze_exercise_solutions(dirs=None, topn=None, copy_hard_set=False):
|
|||
valid_entries = []
|
||||
parse_errors_by_model = {} # Track which exercises had parse errors for each model
|
||||
|
||||
dump(dir_entries)
|
||||
|
||||
for dirname, model in dir_entries:
|
||||
results_data = load_results(dirname)
|
||||
|
||||
if results_data:
|
||||
results, model_parse_errors = results_data
|
||||
parse_errors_by_model[model] = set(model_parse_errors)
|
||||
|
@ -299,7 +305,7 @@ def analyze_exercise_solutions(dirs=None, topn=None, copy_hard_set=False):
|
|||
if copy_hard_set:
|
||||
# Create hard set directory
|
||||
src_dir = Path("tmp.benchmarks/exercism")
|
||||
dst_dir = Path("tmp.benchmarks/exercism-hard-set")
|
||||
dst_dir = Path("tmp.benchmarks/exercism-polyglot")
|
||||
|
||||
if dst_dir.exists():
|
||||
print(f"\nError: Destination directory {dst_dir} already exists")
|
||||
|
@ -340,7 +346,7 @@ if __name__ == "__main__":
|
|||
parser.add_argument(
|
||||
"--copy-hard-set",
|
||||
action="store_true",
|
||||
help="Copy hard set problems to tmp.benchmarks/exercism-hard-set",
|
||||
help="Copy hard set problems to tmp.benchmarks/exercism-polygot",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 user@host"
|
||||
exit 1
|
||||
|
@ -19,10 +21,13 @@ ssh "$DEST" "mkdir -p ~/aider"
|
|||
|
||||
# Sync the repository
|
||||
rsync -avz --delete \
|
||||
--exclude='.git/' \
|
||||
--exclude-from="$EXCLUDE_FILE" \
|
||||
"$REPO_ROOT/" \
|
||||
"$DEST:~/aider/"
|
||||
|
||||
rsync -a .env .bash_history .gitignore "$DEST:~/aider/."
|
||||
|
||||
rsync -a ~/dotfiles/screenrc "$DEST:.screenrc"
|
||||
|
||||
# Clean up
|
||||
rm "$EXCLUDE_FILE"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue