change e2e_nlg_test to be for multi-references
#1
by
jordiclive
- opened
No description provided.
@SebGehr do you know the best way to change e2e_nlg_test/e2e_nlg_test.json to https://raw.githubusercontent.com/jordiclive/GEM_datasets/main/e2e/e2e_nlg_test.json, without having to download everything?
Hi
@jordiclive
I suggest using the huggingface_hub
library to update the file in question. E.g. something like the following should work:
from huggingface_hub import upload_file
hf_token = hf_xxx # Your Hub access token
hub_pr_url = upload_file(
path_or_fileobj="local/path/to/new/e2e_nlg_test.json",
path_in_repo="e2e_nlg_test/e2e_nlg_test.json",
repo_id="GEM/references,
repo_type="dataset",
create_pr=True,
commit_description="Update e2e_nlg_test",
commit_message="Update e2e_nlg_test",
token=hf_token,
)
This will open a Hub pull request so you can check nothing gets broken by accident :)