-
Notifications
You must be signed in to change notification settings - Fork 530
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
Add safe_load option to restrict HF dataset downloads to allowed file types #798
Conversation
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.
generally lgtm. Could you provide some manual testing? Please test both using a custom file, and using both supported and unsupported datasets from the hub.
In the custom file and support hub dataset cases, check that it runs and also that startup time is not dramatically slower than previously.
For the unsupported hub dataset case, just make sure it errors in a reasonable way (i.e. doesn't hang or something)
Manual Tests
test-safe-load-false-valid-hvr7NF - safe_load=False + valid dataset (runs successfully)
test-safe-load-LZNNUv - safe_load=True + valid dataset (runs successfully)
test-safe-load-squad-Lku1Q4 - safe_load=True + invalid dataset (fails with proper error)
test-no-safe-load-squad-jhdtOQ - safe_load=False + invalid dataset (loads the dataset, fails bc data formatting reasons)
safe_load does not add any noticeable overhead. Both runs (valid dataset with safe_load=True and with safe_load=False) take 7 min.