Datasets:
Shuffle the data
Browse files- the_pile_github.py +3 -2
the_pile_github.py
CHANGED
@@ -182,9 +182,10 @@ class SmartContracts(datasets.GeneratorBasedBuilder):
|
|
182 |
#data = pd.read_parquet(filepath)
|
183 |
key = 0
|
184 |
for path in files:
|
185 |
-
|
|
|
186 |
|
187 |
-
for row in
|
188 |
|
189 |
if split_key == "train":
|
190 |
yield key, {
|
|
|
182 |
#data = pd.read_parquet(filepath)
|
183 |
key = 0
|
184 |
for path in files:
|
185 |
+
df = pd.read_parquet(path)
|
186 |
+
df = df.sample(frac = 1, random_state = 42)
|
187 |
|
188 |
+
for row in df.itertuples():
|
189 |
|
190 |
if split_key == "train":
|
191 |
yield key, {
|