Commit ed5f21e
add split argument to Generator (#7015)
* add split argument to Generator, from_generator, AbstractDatasetInputStream, GeneratorDatasetInputStream
* split generator review feedbacks
* import Split
* tag added version in iterable_dataset, rollback change in _concatenate_iterable_datasets
* rm useless Generator __init__
* docstring formatting
Co-authored-by: Albert Villanova del Moral <[email protected]>
* format docstring
Co-authored-by: Albert Villanova del Moral <[email protected]>
* fix test_dataset_from_generator_split[None]
---------
Co-authored-by: Albert Villanova del Moral <[email protected]>1 parent be69bdd commit ed5f21e
File tree
5 files changed
+39
-12
lines changed- src/datasets
- io
- packaged_modules/generator
- tests
5 files changed
+39
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1068 | 1068 | | |
1069 | 1069 | | |
1070 | 1070 | | |
| 1071 | + | |
1071 | 1072 | | |
1072 | 1073 | | |
1073 | 1074 | | |
| |||
1090 | 1091 | | |
1091 | 1092 | | |
1092 | 1093 | | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1093 | 1098 | | |
1094 | 1099 | | |
1095 | 1100 | | |
| |||
1126 | 1131 | | |
1127 | 1132 | | |
1128 | 1133 | | |
| 1134 | + | |
1129 | 1135 | | |
1130 | 1136 | | |
1131 | 1137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | | - | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
2083 | 2083 | | |
2084 | 2084 | | |
2085 | 2085 | | |
| 2086 | + | |
2086 | 2087 | | |
2087 | 2088 | | |
2088 | 2089 | | |
| |||
2095 | 2096 | | |
2096 | 2097 | | |
2097 | 2098 | | |
| 2099 | + | |
| 2100 | + | |
2098 | 2101 | | |
| 2102 | + | |
2099 | 2103 | | |
2100 | 2104 | | |
2101 | 2105 | | |
| |||
2126 | 2130 | | |
2127 | 2131 | | |
2128 | 2132 | | |
2129 | | - | |
2130 | | - | |
2131 | | - | |
2132 | | - | |
| 2133 | + | |
2133 | 2134 | | |
2134 | 2135 | | |
2135 | 2136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3871 | 3871 | | |
3872 | 3872 | | |
3873 | 3873 | | |
3874 | | - | |
| 3874 | + | |
3875 | 3875 | | |
3876 | 3876 | | |
3877 | 3877 | | |
| 3878 | + | |
3878 | 3879 | | |
3879 | 3880 | | |
3880 | 3881 | | |
| |||
3886 | 3887 | | |
3887 | 3888 | | |
3888 | 3889 | | |
3889 | | - | |
| 3890 | + | |
3890 | 3891 | | |
3891 | 3892 | | |
3892 | 3893 | | |
| |||
3907 | 3908 | | |
3908 | 3909 | | |
3909 | 3910 | | |
3910 | | - | |
| 3911 | + | |
| 3912 | + | |
| 3913 | + | |
| 3914 | + | |
| 3915 | + | |
| 3916 | + | |
| 3917 | + | |
| 3918 | + | |
| 3919 | + | |
| 3920 | + | |
| 3921 | + | |
| 3922 | + | |
| 3923 | + | |
| 3924 | + | |
| 3925 | + | |
| 3926 | + | |
| 3927 | + | |
3911 | 3928 | | |
3912 | 3929 | | |
3913 | 3930 | | |
| |||
0 commit comments