Skip to content

Commit

Permalink
add script to add entries to leaderboard locally
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshTrivedi committed Nov 28, 2024
1 parent 5d4a311 commit c424cf8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
# Ignore everything
*

# Except README.md, leaderboard.json, .gitignore and .github
# Except README.md, leaderboard.json, scripts, .gitignore and .github
!README.md
!leaderboard.json
!scripts/
!scripts/*
!.gitignore
!.github/
!.github/workflows/
Expand Down
18 changes: 18 additions & 0 deletions scripts/add_to_leaderboard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import argparse
import subprocess


def main():
parser = argparse.ArgumentParser(description="Add entries to the leaderboard.")
parser.add_argument("experiment_prefixes", nargs="+", type=str, help="experiment prefixes")
args = parser.parse_args()
for experiment_prefix in args.experiment_prefixes:
print(f"\nWorking on experiment prefix: {experiment_prefix}")
experiment_names = [experiment_prefix + "_test_normal", experiment_prefix + "_test_challenge"]
for experiment_name in experiment_names:
subprocess.run(f"appworld evaluate {experiment_name}_test_normal test_normal", check=True, shell=True)
subprocess.run(f"appworld evaluate {experiment_name}_test_challenge test_challenge", check=True, shell=True)
subprocess.run(f"appworld make {experiment_name}_test_normal {experiment_name}_challenge --save", check=True, shell=True)

if __name__ == "__main__":
main()

0 comments on commit c424cf8

Please sign in to comment.