New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting trust_remote_code to True for HuggingFace datasets compatibility #1487
Setting trust_remote_code to True for HuggingFace datasets compatibility #1487
Conversation
The tests are failing at the download step and I'm guessing it's because of the environment variable, although this passes locally, so I may have to add conditionals to account for this if we decide those variables are ok where they are
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @veekaybee !
Upon thinking some more, I think actually, let's do the following (slightly differently to how I originally said it):
- keep
trust_remote_code = False
by default in model constructor - have
trust_remote_code: True
in the YAMLs as you added but only for datasets under the EleutherAI/ HF org or datasets in the default namespace (no org) , the others should not get it set - respect HF_DATASETS_TRUST_REMOTE_CODE env variable when it is set
- add a
--trust_remote_code
CLI flag, which, when set will: 1) causetrust_remote_code=True
to be added to model_args string / passed to model constructor, 2) set the HF_DATASETS_TRUST_REMOTE_CODE env variable to true in main.py (or maybe in simple_evaluate()? we want running on remote-code requiring datasets to be not too annoying for people not using main.py)
How's this sound? basically, the PR as you've implemented it, but with an extra --trust_remote_code
flag in the CLI, and with datasets not in the EAI or HF namespaces requiring this flag. Reasoning being that we'd like to support HF's initiative of making the OSS ecosystem more secure.
This looks like a separate error relating to HeadQA! |
@haileyschoelkopf Thank you! All of that makes sense and I think I've addressed all the comments, please take a look at the new implementation of the check for the trust_remote_code environment variable in main, and I'll check to see how tests are doing, as well. |
Getting new testing failures triggering from update of the YAML files I'm assuming, this time from
should the |
AFAIK the |
In that case, I can take out the kwargs from that YAML file which I think is triggering the test errors -does it also make sense to delete/modify the task? |
You can at least remove the kwargs from the YAML. Note sure if we can fix this task (can it be re-hosted on HF ?) or if it should be removed |
@haileyschoelkopf this is ready for re-review! I removed the headqa task because it was erroring out on expected filetypes and on taking a look, the file pointers are to |
I'm also assuming that once we merge this we'll want to pin this to 2.17 https://github.com/EleutherAI/lm-evaluation-harness/pull/1312/files |
Hi all, I wanted to check on the status of this issue and if it was ok as-is, still needs more review, or is not needed anymore. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize for the delayed review @veekaybee ! Thank you very much for your work on this!
It looks good to me, and I think we can pin datasets>=2.16
now!
I've left some nits but otherwise LGTM!
Should be all addressed @haileyschoelkopf , thank you for taking a look! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your work on this!
…ity (EleutherAI#1487) * setting trust_remote_code * dataset list no notebooks * respect trust remote code * Address changes, move cli options and change datasets * fix task for tests * headqa * remove kobest * pin datasets and address comments * clean up space
…ity (EleutherAI#1487) * setting trust_remote_code * dataset list no notebooks * respect trust remote code * Address changes, move cli options and change datasets * fix task for tests * headqa * remove kobest * pin datasets and address comments * clean up space
See this issue for context: #1135 (comment)
We'd like to be able to use the latest datasets version, 2.16 in lm-evaluation-harness. We currently use 2.15 .
In order to accommodate this, we'd like to:
trust_remote_code
dataset kwarg to each dataset that requires it and pass through. See notebook for derivation of which datasets require it.Include
trust_remote_code
as True by default in the model constructor, to be overriden by -model_args when evaluating from the command line.Respect the user's
HF_DATASETS_TRUST_REMOTE_CODE
if it exists.Related: #1467
cc @lhoestq fyi