[HFFS] Hanlde "refs/convert/parquet"
and "refs/pr/(\d)+"
(PRs) revision correctly
#1710
Labels
enhancement
New feature or request
Milestone
Mentioned in #1707 (comment).
In
HfFileSystem
, revision with a"/"
doesn't work properly if the/
are not url-encoded properly.Example
"hf://datasets/lambdalabs/pokemon-blip-captions@refs/convert/parquet/default/train/000.parquet"
is not a valid path to file
./default/train/000.parquet
in revisionrefs/convert/parquet
.The correct path is
"hf://datasets/lambdalabs/pokemon-blip-captions@refs%2Fconvert%2Fparquet/default/train/000.parquet"
Since
refs/convert/parquet
is a quite special revision, let's handle it separately (same for PR revisions likerefs/pr/1
).Note: this will make repos with a file
refs/convert/parquet/default/train/000.parquet
less convenient to request. However, this is very unlikely to happen compared to the normal use case of revision.cc @mariosasko @Hakimovich99
The text was updated successfully, but these errors were encountered: