Commit 06472a2
committed
fix(datasets): name WebDataset shards as file:// URLs so Windows can open them
webdataset routes every shard string through gopen, which dispatches on the scheme urlparse reads off it. A POSIX
path parses with an empty scheme and reaches the local-file branch; a Windows path does not, because
C:\shards\train-000000.tar parses as scheme "c" and no handler is registered for it. Every streaming test failed on
both windows-latest jobs with "no gopen handler defined" while the same tests passed on ubuntu and macos.
Naming the shards as file:// URLs picks the branch that resolves back to a local path on both platforms, and
Path.as_uri() percent-encodes a directory containing spaces or other reserved characters, which url2pathname
reverses on the way back in.1 parent 2a56582 commit 06472a2
2 files changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
733 | 749 | | |
734 | 750 | | |
735 | 751 | | |
| |||
738 | 754 | | |
739 | 755 | | |
740 | 756 | | |
741 | | - | |
| 757 | + | |
742 | 758 | | |
743 | 759 | | |
744 | 760 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
353 | 355 | | |
354 | 356 | | |
355 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
356 | 368 | | |
357 | 369 | | |
358 | 370 | | |
| |||
0 commit comments