Add command to copy result from one repo to another#71
Conversation
|
|
||
|
|
||
| @dataclass | ||
| class RepoPathsOfInterest: |
There was a problem hiding this comment.
Pulls out logic used in lb publish and the new copy command.
| click.echo( | ||
| "Schema in local dataset_features.yml does not match schema in hf://{repo_id}/README.md" | ||
| try: | ||
| check_submissions_against_readme( |
There was a problem hiding this comment.
pulling this out so I can use it in copy too
| cli.add_command(eval_command) | ||
|
|
||
|
|
||
| @dataclass |
There was a problem hiding this comment.
I found it easier to make sense of submission paths in particular this way... Could be useful in some other commands too...? DIdn't want to make too many changes in one go though...
| default=False, | ||
| help="Provide this if the target results should have log urls in logs_url_public.", | ||
| ) | ||
| def copy_command( |
There was a problem hiding this comment.
Example command, if you wanted to copy something over from the internal repos to the public ones.
agenteval copy --target-submissions-repo "allenai/asta-bench-submissions" --target-results-repo "allenai/asta-bench-results" --write-public-logs-field "hf://allenai/asta-bench-internal-results/1.0.0/test/aakanksha19_Asta_Table_Synthesis__GPT-4.1__2025-07-11T21-23-03.json" "hf://allenai/asta-bench-internal-results/1.0.0/test/aakanksha19_Asta_Table_Synthesis__Pro-2.5__2025-07-12T06-06-53.json"
| return Features._from_yaml_list(yaml_values) | ||
|
|
||
|
|
||
| def check_submissions_against_readme( |
There was a problem hiding this comment.
Not a big deal, but this feels like it belongs in the Readme class. Maybe even with a single LeaderboardSubmission parameter, so the loop would be done by the calling code.
| new_logs_url = ( | ||
| f"hf://datasets/{target_submissions_repo}/{src_submission_path}" | ||
| ) | ||
| if write_public_logs_field: |
There was a problem hiding this comment.
I'm not up to speed on logs_url vs. logs_url_public, but this certainly looks weird to me. It means the copy is not a strict copy. If we need some way of syncing the logs_url and logs_url_public, maybe that should be an explicit separate step.
Or if modifying the data during the copy is unavoidable, maybe the command should just have a different name, like migrate
There was a problem hiding this comment.
Yeah I agree that this looks kinda weird...
For the results in the new results repo, I ended up putting their logs under logs_url_public because of the logs_url line here:
agent-eval/src/agenteval/leaderboard/view.py
Lines 615 to 628 in b3a7b49
The leaderboard looks at that log_url field to make its log link, and there's leaderboard code that determines which HF resources to use based on whether we're in 'internal' mode or not.
But I guess it might be worth figuring out if this is what was originally pictured for logs_url vs logs_url_public. @mdarcy220 do you know or should we pull in Jonathan?
There was a problem hiding this comment.
I don't know much about the lb-related code in general; my best guess is that it's related to the notion that we could publish a result publicly with some of our logs but have more verbose logs internally (e.g. for legal reasons). But I don't actually know; Jonathan is probably the best bet.
There was a problem hiding this comment.
This was built with the idea that we may post submissions to a private dataset, and then only make a subset of submissions public. However, we did not need this functionality and only have a public dataset.
There was a problem hiding this comment.
So we no longer need both the logs_url and logs_url_public fields in submission metadata?
There was a problem hiding this comment.
You would know better what we need @ca16 given my comment :)
|
Okay I think based on Jonathan's comment, we don't really need separate fields anymore, and maybe the thing to do is have just logs_url, and remove the logs_url_public field (and update code in the leaderboard accordingly). I'll open a separate ticket for that. After that I can update this to address @rodneykinney 's comment. |
|
Ticket for removing logs_url_public: https://github.com/allenai/astabench-issues/issues/472 . |
Related to https://github.com/allenai/astabench-issues/issues/465.
This PR adds a cleaned-up version of the command that I used to copy over results and their submissions from the internal repos to the public ones.
Some bits are quite similar to what's in lb publish, so I've pulled some common stuff out.
Testing done:
I commented out the uploads and added some prints, and ran both
lb publish(to make sure I didn't break it) andcopy:For the reviewers:
I think if it's not clear we really want this rn, it's fine to put it off until we decide our new priorities. It'll be here later if we want to pick it back up.