Fix HuggingFace uploads and downloads #316
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #314
Fixes #315
@nikhilwoodruff If these changes don't match with how you're envisioning this working with the
policyengine.py
package, please feel free to let me know. I obviously don't want to step on your toes, I just ran into a couple issues when attempting to use the HuggingFace code live and believe this would fix these issues. Also, these changes assume that the standard HuggingFace URL looks something like this example for the ECPS:If that's not actually how they look, then these changes may not function correctly.
To avoid ambiguity and the need for
-core
to treat one type of URL as preferential over another, this PR merges theurl
andhuggingface_url
attributes ofDataset
instances into oneurl
. It removes any code attempting to prioritize one over the other, then makes changes to thedownload_from_huggingface
method to better match the relevant underlying method.