File size: 168,215 Bytes
c9f04a5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "75b58048-7d14-4fc6-8085-1fc08c81b4a6",
   "metadata": {},
   "source": [
    "# Fine-Tune Whisper With 🤗 Transformers and Streaming Mode"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fbfa8ad5-4cdc-4512-9058-836cbbf65e1a",
   "metadata": {},
   "source": [
    "In this Colab, we present a step-by-step guide on fine-tuning Whisper with Hugging Face 🤗 Transformers on 400 hours of speech data! Using streaming mode, we'll show how you can train a speech recongition model on any dataset, irrespective of size. With streaming mode, storage requirements are no longer a consideration: you can train a model on whatever dataset you want, even if it's download size exceeds your devices disk space. How can this be possible? It simply seems too good to be true! Well, rest assured it's not 😉 Carry on reading to find out more."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "afe0d503-ae4e-4aa7-9af4-dbcba52db41e",
   "metadata": {},
   "source": [
    "## Introduction"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9ae91ed4-9c3e-4ade-938e-f4c2dcfbfdc0",
   "metadata": {},
   "source": [
    "Speech recognition datasets are large. A typical speech dataset consists of approximately 100 hours of audio-transcription data, requiring upwards of 130GB of storage space for download and preparation. For most ASR researchers, this is already at the upper limit of what is feasible for disk space. So what happens when we want to train on a larger dataset? The full [LibriSpeech](https://huggingface.co/datasets/librispeech_asr) dataset consists of 960 hours of audio data. Kensho's [SPGISpeech](https://huggingface.co/datasets/kensho/spgispeech) contains 5,000 hours of audio data. ML Commons [People's Speech](https://huggingface.co/datasets/MLCommons/peoples_speech) contains **30,000+** hours of audio data! Do we need to bite the bullet and buy additional storage? Or is there a way we can train on all of these datasets with no disk drive requirements?\n",
    "\n",
    "When training machine learning systems, we rarely use the entire dataset at once. We typically _batch_ our data into smaller subsets of data, and pass these incrementally through our training pipeline. This is because we train our system on an accelerator device, such as a GPU or TPU, which has a memory limit typically around 16GB. We have to fit our model, optimiser and training data all on the same accelerator device, so we usually have to divide the dataset up into smaller batches and move them from the CPU to the GPU when required.\n",
    "\n",
    "Consequently, we don't require the entire dataset to be downloaded at once; we simply need the batch of data that we pass to our model at any one go. We can leverage this principle of partial dataset loading when preparing our dataset: rather than downloading the entire dataset at the start, we can load each piece of data as and when we need it. For each batch, we load the relevant data from a remote server and pass it through the training pipeline. For the next batch, we load the next items and again pass them through the training pipeline. At no point do we have to save data to our disk drive, we simply load them in memory and use them in our pipeline. In doing so, we only ever need as much memory as each individual batch requires.\n",
    "\n",
    "This is analogous to downloading a TV show versus streaming it 📺 When we download a TV show, we download the entire video offline and save it to our disk. Compare this to when we stream a TV show. Here, we don't download any part of the video to memory, but iterate over the video file and load each part in real-time as required. It's this same principle that we can apply to our ML training pipeline! We want to iterate over the dataset and load each sample of data as required.\n",
    "\n",
    "While the principle of partial dataset loading sounds ideal, it also seems **pretty** difficult to do. Luckily for us, 🤗 Datasets allows us to do this with minimal code changes! We'll make use of the principle of [_streaming_](https://huggingface.co/docs/datasets/stream), depicted graphically in Figure 1. Streaming does exactly this: the data is loaded progressively as we iterate over the dataset, meaning it is only loaded as and when we need it. If you're familiar with 🤗 Transformers and Datasets, the content of this notebook will be very familiar, with some small extensions to support streaming mode."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1c87f76e-47be-4a5d-bc52-7b1c2e9d4f5a",
   "metadata": {},
   "source": [
    "<figure>\n",
    "<img src=\"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/streaming.gif\" alt=\"Trulli\" style=\"width:100%\">\n",
    "<figcaption align = \"center\"><b>Figure 1:</b> Streaming mode. The dataset is divided into smaller subsets, with subsets loaded progressively as we iterate over the dataset. </figcaption>\n",
    "</figure>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "21b6316e-8a55-4549-a154-66d3da2ab74a",
   "metadata": {},
   "source": [
    "This notebook provides a guide to fine-tuning on the task of _speech recognition_, which involves learning a\n",
    "mapping from speech to text. Speech recognition is divided into two categories: English-only or multilingual (all other languages). \n",
    "This notebook applies to both categories, with pointers for changing between languages and datasets.\n",
    "\n",
    "As for our model, we'll fine-tune the Whisper model released in [September 2022](https://openai.com/blog/whisper/) by the authors \n",
    "Alec Radford et al. from OpenAI. Whisper is an encoder-decoder model pre-trained on 680k hours of labelled audio-transcription data. \n",
    "It achieves strong performance on many speech recognition and speech translation datasets without fine-tuning. With fine-tuning, \n",
    "we aim to improve upon these results further, with many SoTA results up for grabs! For a full explanation on the Whisper model, the \n",
    "reader is advised to read the blog post [Fine-Tune Whisper with 🤗 Transformers](https://huggingface.co/blog/fine-tune-whisper#introduction).\n",
    "\n",
    "The Whisper checkpoints come in five configurations of varying model sizes.\n",
    "The smallest four are trained on either English-only or multilingual data.\n",
    "The largest checkpoint is multilingual only. All nine of the pre-trained checkpoints \n",
    "are available on the [Hugging Face Hub](https://huggingface.co/models?search=openai/whisper). The \n",
    "checkpoints are summarised in the following table with links to the models on the Hub:\n",
    "\n",
    "| Size   | Layers | Width | Heads | Parameters | English-only                                         | Multilingual                                      |\n",
    "|--------|--------|-------|-------|------------|------------------------------------------------------|---------------------------------------------------|\n",
    "| tiny   | 4      | 384   | 6     | 39 M       | [✓](https://huggingface.co/openai/whisper-tiny.en)   | [✓](https://huggingface.co/openai/whisper-tiny.)  |\n",
    "| base   | 6      | 512   | 8     | 74 M       | [✓](https://huggingface.co/openai/whisper-base.en)   | [✓](https://huggingface.co/openai/whisper-base)   |\n",
    "| small  | 12     | 768   | 12    | 244 M      | [✓](https://huggingface.co/openai/whisper-small.en)  | [✓](https://huggingface.co/openai/whisper-small)  |\n",
    "| medium | 24     | 1024  | 16    | 769 M      | [✓](https://huggingface.co/openai/whisper-medium.en) | [✓](https://huggingface.co/openai/whisper-medium) |\n",
    "| large  | 32     | 1280  | 20    | 1550 M     | x                                                    | [✓](https://huggingface.co/openai/whisper-large)  |\n",
    "\n",
    "When fine-tuning on an English dataset for speech recognition, it is recommeneded to select one of the English-only checkpoints. For any other language, it is recommended to select a multilingual checkpoint.\n",
    "\n",
    "For demonstration purposes, we'll fine-tune the multilingual version of the \n",
    "[`\"small\"`](https://huggingface.co/openai/whisper-small) checkpoint with 244M params (~= 1GB). \n",
    "As for our data, we'll train and evaluate our system on 400 hours of multilingual speech recognition data\n",
    "taken from the [Common Voice 11](https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0)\n",
    "dataset. We'll show how we can train a model on 400 hours of training data using the default disk space \n",
    "that comes with a standard GPU device or Google Colab."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b219c9dd-39b6-4a95-b2a1-3f547a1e7bc0",
   "metadata": {},
   "source": [
    "## Load Dataset with Streaming"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b17a4763-4381-4157-ae38-b04a8b5f1c43",
   "metadata": {},
   "source": [
    "This is where the magic happens! We'll first write a wrapper function around 🤗 Datasets `load_dataset` method. This function downloads the required splits using streaming mode by forcing `streaming=True` in the `load_dataset` method. Multiple splits can be combined (interleaved) by concatenating them with the \"+\" symbol when specifying the split name, e.g. `split=train+validation` will return a single split with the training and validation splits interleaved together. The function has the same arguments and key-word arguments as 🤗 Datasets `load_dataset` method, so we can use it in exactly the same way!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "065a8cf7-e54f-4ac3-900e-609c80714fca",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ubuntu/hf_env/lib/python3.8/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
      "  from .autonotebook import tqdm as notebook_tqdm\n"
     ]
    }
   ],
   "source": [
    "from datasets import interleave_datasets, load_dataset\n",
    "\n",
    "def load_streaming_dataset(dataset_name, dataset_config_name, split, **kwargs):\n",
    "    if \"+\" in split:\n",
    "        # load multiple splits separated by the `+` symbol *with* streaming mode\n",
    "        dataset_splits = [load_dataset(dataset_name, dataset_config_name, split=split_name, streaming=False, **kwargs) for split_name in split.split(\"+\")]\n",
    "        # interleave multiple splits to form one dataset\n",
    "        interleaved_dataset = interleave_datasets(dataset_splits)\n",
    "        return interleaved_dataset\n",
    "    else:\n",
    "        # load a single split *with* streaming mode\n",
    "        dataset = load_dataset(dataset_name, dataset_config_name, split=split, streaming=False, **kwargs)\n",
    "        return dataset"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "674429c5-0ab4-4adf-975b-621bb69eca38",
   "metadata": {},
   "source": [
    "We'll train our system on the Spanish split of [Common Voice 11](https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0). We can see how much training data we have by viewing the [language page](https://commonvoice.mozilla.org/en/datasets) on the Common Voice website. The Spanish split has over 400 hours of labelled training data - that's enourmous! More than we could ever fit on a Google Colab or a standard workstation. But with streaming mode, we'll only download data as and when we need it, making training on this dataset possible!\n",
    "\n",
    "Since Spanish is relatively high-resource, we'll only use the `train` split for training and the `test` split for evaluation. If you're training on a low-resource language, such as the Hindi split of Common Voice 11, it's worth combining the `train` and `validation` splits to give a larger training set. You can achieve this by setting: `split=\"train+validation\"` for the training split.\n",
    "\n",
    "If you're using a gated dataset, like Common Voice 11, ensure you have accepted the terms of use on the Hugging Face Hub: [mozilla-foundation/common_voice_11_0](https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0). Once you have accepted the terms, you will have full access to the dataset and be able to load the data locally."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "a2787582-554f-44ce-9f38-4180a5ed6b44",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Found cached dataset bloom-speech (/home/ubuntu/.cache/huggingface/datasets/sil-ai___bloom-speech/tgl/0.0.0/ba166e4fcea0aaacbf39232cec3098c3cb7609999c71f26c45bce9d5acf5a7b0)\n",
      "Found cached dataset bloom-speech (/home/ubuntu/.cache/huggingface/datasets/sil-ai___bloom-speech/tgl/0.0.0/ba166e4fcea0aaacbf39232cec3098c3cb7609999c71f26c45bce9d5acf5a7b0)\n",
      "Found cached dataset bloom-speech (/home/ubuntu/.cache/huggingface/datasets/sil-ai___bloom-speech/tgl/0.0.0/ba166e4fcea0aaacbf39232cec3098c3cb7609999c71f26c45bce9d5acf5a7b0)\n"
     ]
    }
   ],
   "source": [
    "from datasets import IterableDatasetDict\n",
    "\n",
    "raw_datasets = IterableDatasetDict()\n",
    "\n",
    "raw_datasets[\"train\"] = load_streaming_dataset(\"sil-ai/bloom-speech\", 'tgl', split=\"train+validation\", use_auth_token=True)  # set split=\"train+validation\" for low-resource\n",
    "raw_datasets[\"test\"] = load_streaming_dataset(\"sil-ai/bloom-speech\", 'tgl', split=\"test\", use_auth_token=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2d63b2d2-f68a-4d74-b7f1-5127f6d16605",
   "metadata": {},
   "source": [
    "## Prepare Processor and Pre-Process Data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "601c3099-1026-439e-93e2-5635b3ba5a73",
   "metadata": {},
   "source": [
    "The ASR pipeline can be de-composed into three stages: \n",
    "1) A feature extractor which pre-processes the raw audio-inputs\n",
    "2) The model which performs the sequence-to-sequence mapping \n",
    "3) A tokenizer which post-processes the model outputs to text format\n",
    "\n",
    "In 🤗 Transformers, the Whisper model has an associated feature extractor and tokenizer, \n",
    "called [WhisperFeatureExtractor](https://huggingface.co/docs/transformers/main/model_doc/whisper#transformers.WhisperFeatureExtractor)\n",
    "and [WhisperTokenizer](https://huggingface.co/docs/transformers/main/model_doc/whisper#transformers.WhisperTokenizer) \n",
    "respectively. To make our lives simple, these two objects are wrapped under a single class, called the [WhisperProcessor](https://huggingface.co/docs/transformers/model_doc/whisper#transformers.WhisperProcessor). We can call the WhisperProcessor to perform \n",
    "both the audio pre-processing and the text token post-processing. In doing so, we only need to keep track of two objects during training: \n",
    "the `processor` and the `model`.\n",
    "\n",
    "If using a multilingual checkpoint, you should set the `\"language\"` to your target text language. You should also set the task to `\"transcribe\"` for speech recogntition and `\"translate\"` for speech translation. These arguments modify the behaviour of the tokenizer - they should be set correctly to ensure the target labels are encoded properly. These arguments should be omitted for English-only fine-tuning."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "0c25fab9-569a-4d3e-848b-a1f4ac78e88a",
   "metadata": {},
   "outputs": [],
   "source": [
    "from transformers import WhisperProcessor\n",
    "\n",
    "processor = WhisperProcessor.from_pretrained(\"openai/whisper-tiny\", language=\"Tagalog\", task=\"transcribe\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "381acd09-0b0f-4d04-9eb3-f028ac0e5f2c",
   "metadata": {},
   "source": [
    "### Pre-Process Data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bf10cd3e-924e-44fc-8790-46e413de7b3d",
   "metadata": {},
   "source": [
    "Let's have a look at the dataset features. Pay particular attention to the `\"audio\"` column - this details the sampling rate of our audio inputs:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "ab5a13b4-9bd4-4aa0-aef2-b3de9b762988",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'file': Value(dtype='string', id=None),\n",
       " 'audio': Audio(sampling_rate=16000, mono=True, decode=True, id=None),\n",
       " 'text': Value(dtype='string', id=None),\n",
       " 'book': Value(dtype='string', id=None),\n",
       " 'instance': Value(dtype='string', id=None),\n",
       " 'license': Value(dtype='string', id=None),\n",
       " 'credits': Value(dtype='string', id=None),\n",
       " 'original_lang_tag': Value(dtype='string', id=None)}"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "raw_datasets[\"train\"].features"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5a679f05-063d-41b3-9b58-4fc9c6ccf4fd",
   "metadata": {},
   "source": [
    "Since our input audio is sampled at 48kHz, we need to _downsample_ it to\n",
    "16kHz prior to passing it to the Whisper feature extractor, 16kHz being the sampling rate expected by the Whisper model. \n",
    "\n",
    "We'll set the audio inputs to the correct sampling rate using dataset's \n",
    "[`cast_column`](https://huggingface.co/docs/datasets/package_reference/main_classes.html?highlight=cast_column#datasets.DatasetDict.cast_column)\n",
    "method. This operation does not change the audio in-place, \n",
    "but rather signals to `datasets` to resample audio samples _on the fly_ the \n",
    "first time that they are loaded:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "3ab6a724-3d1e-478b-a9e9-d2f85feb6c39",
   "metadata": {},
   "outputs": [],
   "source": [
    "from datasets import Audio\n",
    "\n",
    "raw_datasets = raw_datasets.cast_column(\"audio\", Audio(sampling_rate=16000))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "820bdebf-c7e0-4206-9dc4-f60bbe0a5441",
   "metadata": {},
   "outputs": [],
   "source": [
    "renamed_datasets = raw_datasets.rename_column(\"text\", \"sentence\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "161322c2-94f3-4d26-9e1d-d9d5202ca3cf",
   "metadata": {},
   "source": [
    "We'll define our pre-processing strategy. We advise that you **do not** lower-case the transcriptions or remove punctuation unless mixing different datasets. This will enable you to fine-tune Whisper models that can predict punctuation and casing. Later, you will see how we can evaluate the predictions without punctuation or casing, so that the models benefit from the WER improvement obtained by normalising the transcriptions while still predicting fully formatted transcriptions."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "d041650e-1c48-4439-87b3-5b6f4a514107",
   "metadata": {},
   "outputs": [],
   "source": [
    "from transformers.models.whisper.english_normalizer import BasicTextNormalizer\n",
    "\n",
    "do_lower_case = False\n",
    "do_remove_punctuation = False\n",
    "\n",
    "normalizer = BasicTextNormalizer()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bfaa935b-a11d-497c-88c1-0c4d1bb3247b",
   "metadata": {},
   "source": [
    "Now we can write a function to prepare our data ready for the model:\n",
    "1. We load and resample the audio data by calling `batch[\"audio\"]`. As explained above, 🤗 Datasets performs any necessary resampling operations on the fly.\n",
    "2. We use the feature extractor to compute the log-Mel spectrogram input features from our 1-dimensional audio array.\n",
    "3. We perform any optional pre-processing (lower-case or remove punctuation).\n",
    "4. We encode the transcriptions to label ids through the use of the tokenizer."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "c085911c-a10a-41ef-8874-306e0503e9bb",
   "metadata": {},
   "outputs": [],
   "source": [
    "def prepare_dataset(batch):\n",
    "    # load and (possibly) resample audio data to 16kHz\n",
    "    audio = batch[\"audio\"]\n",
    "\n",
    "    # compute log-Mel input features from input audio array \n",
    "    batch[\"input_features\"] = processor.feature_extractor(audio[\"array\"], sampling_rate=audio[\"sampling_rate\"]).input_features[0]\n",
    "    # compute input length of audio sample in seconds\n",
    "    batch[\"input_length\"] = len(audio[\"array\"]) / audio[\"sampling_rate\"]\n",
    "    \n",
    "    # optional pre-processing steps\n",
    "    transcription = batch[\"sentence\"]\n",
    "    if do_lower_case:\n",
    "        transcription = transcription.lower()\n",
    "    if do_remove_punctuation:\n",
    "        transcription = normalizer(transcription).strip()\n",
    "    \n",
    "    # encode target text to label ids\n",
    "    batch[\"labels\"] = processor.tokenizer(transcription).input_ids\n",
    "    return batch"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "70b319fb-2439-4ef6-a70d-a47bf41c4a13",
   "metadata": {},
   "source": [
    "We can apply the data preparation function to all of our training examples using 🤗 Datasets' `.map` method. We'll remove all of the columns from the raw training data, leaving just the `input_features` and `labels` defined in the `prepare_dataset` function:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "a37a7cdb-9013-427f-8de9-6a8d0e9dc684",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|█| 96/96 [00:07<\n",
      "100%|█| 50/50 [00:02<\n"
     ]
    }
   ],
   "source": [
    "vectorized_datasets = renamed_datasets.map(prepare_dataset, remove_columns=list(next(iter(renamed_datasets.values())).features)).with_format(\"torch\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3d59b37e-4950-47ec-9e3e-2cf2ec7fc750",
   "metadata": {},
   "source": [
    "We can now define how we shuffle the data in the train split. The size of the subset we load is set by the variable `buffer_size`. You can increase or decrease this depending on your memory constraints. In this example, the `buffer_size` is set to 500, meaning 500 samples are loaded before shuffling across the subset. The larger we set this value, the closer to True offline shuffling. The `seed` is set for reproducibility:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "1b145699-acfc-4b1d-93a2-a2ad3d62674c",
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "shuffle() got an unexpected keyword argument 'buffer_size'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[14], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m vectorized_datasets[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtrain\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[43mvectorized_datasets\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtrain\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mshuffle\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m      2\u001b[0m \u001b[43m    \u001b[49m\u001b[43mbuffer_size\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m500\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m      3\u001b[0m \u001b[43m    \u001b[49m\u001b[43mseed\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m      4\u001b[0m \u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/arrow_dataset.py:529\u001b[0m, in \u001b[0;36mtransmit_format.<locals>.wrapper\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m    522\u001b[0m self_format \u001b[38;5;241m=\u001b[39m {\n\u001b[1;32m    523\u001b[0m     \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtype\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_format_type,\n\u001b[1;32m    524\u001b[0m     \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mformat_kwargs\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_format_kwargs,\n\u001b[1;32m    525\u001b[0m     \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcolumns\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_format_columns,\n\u001b[1;32m    526\u001b[0m     \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124moutput_all_columns\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_output_all_columns,\n\u001b[1;32m    527\u001b[0m }\n\u001b[1;32m    528\u001b[0m \u001b[38;5;66;03m# apply actual function\u001b[39;00m\n\u001b[0;32m--> 529\u001b[0m out: Union[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mDataset\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mDatasetDict\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    530\u001b[0m datasets: List[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mDataset\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mlist\u001b[39m(out\u001b[38;5;241m.\u001b[39mvalues()) \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(out, \u001b[38;5;28mdict\u001b[39m) \u001b[38;5;28;01melse\u001b[39;00m [out]\n\u001b[1;32m    531\u001b[0m \u001b[38;5;66;03m# re-apply format to the output\u001b[39;00m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/fingerprint.py:480\u001b[0m, in \u001b[0;36mfingerprint_transform.<locals>._fingerprint.<locals>.wrapper\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m    476\u001b[0m             validate_fingerprint(kwargs[fingerprint_name])\n\u001b[1;32m    478\u001b[0m \u001b[38;5;66;03m# Call actual function\u001b[39;00m\n\u001b[0;32m--> 480\u001b[0m out \u001b[38;5;241m=\u001b[39m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    482\u001b[0m \u001b[38;5;66;03m# Update fingerprint of in-place transforms + update in-place history of transforms\u001b[39;00m\n\u001b[1;32m    484\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m inplace:  \u001b[38;5;66;03m# update after calling func so that the fingerprint doesn't change if the function fails\u001b[39;00m\n",
      "\u001b[0;31mTypeError\u001b[0m: shuffle() got an unexpected keyword argument 'buffer_size'"
     ]
    }
   ],
   "source": [
    "vectorized_datasets[\"train\"] = vectorized_datasets[\"train\"].shuffle(\n",
    "    buffer_size=500,\n",
    "    seed=0,\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "666b9ef0-7909-4e1e-a419-87604d233e29",
   "metadata": {},
   "source": [
    "Finally, we filter any training data with audio samples longer than 30s. These samples would otherwise be truncated by the Whisper feature-extractor which could affect the stability of training. We define a function that returns `True` for samples that are less than 30s, and `False` for those that are longer:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "01cb25ef-4bb0-4325-9461-f59198acadf6",
   "metadata": {},
   "outputs": [],
   "source": [
    "max_input_length = 30.0\n",
    "\n",
    "def is_audio_in_length_range(length):\n",
    "    return length < max_input_length"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "28e37ac3-b1c5-465b-8586-7cfd8d76b0f1",
   "metadata": {},
   "source": [
    "We apply our filter function to all samples of our training dataset through 🤗 Datasets' `.filter` method:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "333f7f6e-6053-4d3b-8924-c733c79b82ac",
   "metadata": {},
   "outputs": [],
   "source": [
    "vectorized_datasets[\"train\"] = vectorized_datasets[\"train\"].filter(\n",
    "    is_audio_in_length_range,\n",
    "    input_columns=[\"input_length\"],\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "263a5a58-0239-4a25-b0df-c625fc9c5810",
   "metadata": {},
   "source": [
    "## Training and Evaluation"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a693e768-c5a6-453f-89a1-b601dcf7daf7",
   "metadata": {},
   "source": [
    "Now that we've prepared our data, we're ready to dive into the training pipeline. \n",
    "The [🤗 Trainer](https://huggingface.co/transformers/master/main_classes/trainer.html?highlight=trainer)\n",
    "will do much of the heavy lifting for us. All we have to do is:\n",
    "\n",
    "- Define a data collator: the data collator takes our pre-processed data and prepares PyTorch tensors ready for the model.\n",
    "\n",
    "- Evaluation metrics: during evaluation, we want to evaluate the model using the [word error rate (WER)](https://huggingface.co/metrics/wer) metric. We need to define a `compute_metrics` function that handles this computation.\n",
    "\n",
    "- Load a pre-trained checkpoint: we need to load a pre-trained checkpoint and configure it correctly for training.\n",
    "\n",
    "- Define the training configuration: this will be used by the 🤗 Trainer to define the training schedule."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8d230e6d-624c-400a-bbf5-fa660881df25",
   "metadata": {},
   "source": [
    "### Define a Data Collator"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "04def221-0637-4a69-b242-d3f0c1d0ee78",
   "metadata": {},
   "source": [
    "The data collator for a sequence-to-sequence speech model is unique in the sense that it \n",
    "treats the `input_features` and `labels` independently: the  `input_features` must be \n",
    "handled by the feature extractor and the `labels` by the tokenizer.\n",
    "\n",
    "The `input_features` are already padded to 30s and converted to a log-Mel spectrogram \n",
    "of fixed dimension by action of the feature extractor, so all we have to do is convert the `input_features`\n",
    "to batched PyTorch tensors. We do this using the feature extractor's `.pad` method with `return_tensors=pt`.\n",
    "\n",
    "The `labels` on the other hand are un-padded. We first pad the sequences\n",
    "to the maximum length in the batch using the tokenizer's `.pad` method. The padding tokens \n",
    "are then replaced by `-100` so that these tokens are **not** taken into account when \n",
    "computing the loss. We then cut the BOS token from the start of the label sequence as we \n",
    "append it later during training.\n",
    "\n",
    "We can leverage the `WhisperProcessor` we defined earlier to perform both the \n",
    "feature extractor and the tokenizer operations:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8326221e-ec13-4731-bb4e-51e5fc1486c5",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "\n",
    "from dataclasses import dataclass\n",
    "from typing import Any, Dict, List, Union\n",
    "\n",
    "@dataclass\n",
    "class DataCollatorSpeechSeq2SeqWithPadding:\n",
    "    processor: Any\n",
    "\n",
    "    def __call__(self, features: List[Dict[str, Union[List[int], torch.Tensor]]]) -> Dict[str, torch.Tensor]:\n",
    "        # split inputs and labels since they have to be of different lengths and need different padding methods\n",
    "        # first treat the audio inputs by simply returning torch tensors\n",
    "        input_features = [{\"input_features\": feature[\"input_features\"]} for feature in features]\n",
    "        batch = self.processor.feature_extractor.pad(input_features, return_tensors=\"pt\")\n",
    "\n",
    "        # get the tokenized label sequences\n",
    "        label_features = [{\"input_ids\": feature[\"labels\"]} for feature in features]\n",
    "        # pad the labels to max length\n",
    "        labels_batch = self.processor.tokenizer.pad(label_features, return_tensors=\"pt\")\n",
    "\n",
    "        # replace padding with -100 to ignore loss correctly\n",
    "        labels = labels_batch[\"input_ids\"].masked_fill(labels_batch.attention_mask.ne(1), -100)\n",
    "\n",
    "        # if bos token is appended in previous tokenization step,\n",
    "        # cut bos token here as it's append later anyways\n",
    "        if (labels[:, 0] == self.processor.tokenizer.bos_token_id).all().cpu().item():\n",
    "            labels = labels[:, 1:]\n",
    "\n",
    "        batch[\"labels\"] = labels\n",
    "\n",
    "        return batch"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3cae7dbf-8a50-456e-a3a8-7fd005390f86",
   "metadata": {},
   "source": [
    "Let's initialise the data collator we've just defined:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fc834702-c0d3-4a96-b101-7b87be32bf42",
   "metadata": {},
   "outputs": [],
   "source": [
    "data_collator = DataCollatorSpeechSeq2SeqWithPadding(processor=processor)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d62bb2ab-750a-45e7-82e9-61d6f4805698",
   "metadata": {},
   "source": [
    "### Evaluation Metrics"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "66fee1a7-a44c-461e-b047-c3917221572e",
   "metadata": {},
   "source": [
    "We'll use the word error rate (WER) metric, the 'de-facto' metric for assessing \n",
    "ASR systems. For more information, refer to the WER [docs](https://huggingface.co/metrics/wer). We'll load the WER metric from 🤗 Evaluate:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b22b4011-f31f-4b57-b684-c52332f92890",
   "metadata": {},
   "outputs": [],
   "source": [
    "import evaluate\n",
    "\n",
    "metric = evaluate.load(\"wer\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "509f96d7-3f11-4f37-add9-f74a0c44f3fc",
   "metadata": {},
   "source": [
    "We then simply have to define a function that takes our model \n",
    "predictions and returns the WER metric. This function, called\n",
    "`compute_metrics`, first replaces `-100` with the `pad_token_id`\n",
    "in the `label_ids` (undoing the step we applied in the \n",
    "data collator to ignore padded tokens correctly in the loss).\n",
    "It then decodes the predicted and label ids to strings. Finally,\n",
    "it computes the WER between the predictions and reference labels. \n",
    "Here, we have the option of evaluating with the 'normalised' transcriptions \n",
    "and predictions. We recommend you set this to `True` to benefit from the WER \n",
    "improvement obtained by normalising the transcriptions."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a11d1bfc-9e28-460f-a287-72d8f7bc1acb",
   "metadata": {},
   "outputs": [],
   "source": [
    "# evaluate with the 'normalised' WER\n",
    "do_normalize_eval = True\n",
    "\n",
    "def compute_metrics(pred):\n",
    "    pred_ids = pred.predictions\n",
    "    label_ids = pred.label_ids\n",
    "\n",
    "    # replace -100 with the pad_token_id\n",
    "    label_ids[label_ids == -100] = processor.tokenizer.pad_token_id\n",
    "\n",
    "    # we do not want to group tokens when computing the metrics\n",
    "    pred_str = processor.tokenizer.batch_decode(pred_ids, skip_special_tokens=True)\n",
    "    label_str = processor.tokenizer.batch_decode(label_ids, skip_special_tokens=True)\n",
    "\n",
    "    if do_normalize_eval:\n",
    "        pred_str = [normalizer(pred) for pred in pred_str]\n",
    "        label_str = [normalizer(label) for label in label_str]\n",
    "        # filtering step to only evaluate the samples that correspond to non-zero references:\n",
    "        pred_str = [pred_str[i] for i in range(len(pred_str)) if len(label_str[i]) > 0]\n",
    "        label_str = [label_str[i] for i in range(len(label_str)) if len(label_str[i]) > 0]\n",
    "\n",
    "    wer = 100 * metric.compute(predictions=pred_str, references=label_str)\n",
    "\n",
    "    return {\"wer\": wer}"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "daf2a825-6d9f-4a23-b145-c37c0039075b",
   "metadata": {},
   "source": [
    "### Load a Pre-Trained Checkpoint"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "437a97fa-4864-476b-8abc-f28b8166cfa5",
   "metadata": {},
   "source": [
    "Now let's load the pre-trained Whisper `small` checkpoint. Again, this \n",
    "is trivial through use of 🤗 Transformers!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5a10cc4b-07ec-4ebd-ac1d-7c601023594f",
   "metadata": {},
   "outputs": [],
   "source": [
    "from transformers import WhisperForConditionalGeneration\n",
    "\n",
    "model = WhisperForConditionalGeneration.from_pretrained(\"openai/whisper-tiny\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a15ead5f-2277-4a39-937b-585c2497b2df",
   "metadata": {},
   "source": [
    "Override generation arguments - no tokens are forced as decoder outputs (see [`forced_decoder_ids`](https://huggingface.co/docs/transformers/main_classes/text_generation#transformers.generation_utils.GenerationMixin.generate.forced_decoder_ids)), no tokens are suppressed during generation (see [`suppress_tokens`](https://huggingface.co/docs/transformers/main_classes/text_generation#transformers.generation_utils.GenerationMixin.generate.suppress_tokens)). Set `use_cache` to False since we're using gradient checkpointing, and the two are incompatible:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "62038ba3-88ed-4fce-84db-338f50dcd04f",
   "metadata": {},
   "outputs": [],
   "source": [
    "model.config.forced_decoder_ids = None\n",
    "model.config.suppress_tokens = []\n",
    "model.config.use_cache = False"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2178dea4-80ca-47b6-b6ea-ba1915c90c06",
   "metadata": {},
   "source": [
    "### Define the Training Configuration"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c21af1e9-0188-4134-ac82-defc7bdcc436",
   "metadata": {},
   "source": [
    "In the final step, we define all the parameters related to training. Here, you can set the `max_steps` to train for longer. For more detail on the training arguments, refer to the Seq2SeqTrainingArguments [docs](https://huggingface.co/docs/transformers/main_classes/trainer#transformers.Seq2SeqTrainingArguments)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "0ae3e9af-97b7-4aa0-ae85-20b23b5bcb3a",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "PyTorch: setting up devices\n"
     ]
    }
   ],
   "source": [
    "from transformers import Seq2SeqTrainingArguments\n",
    "\n",
    "training_args = Seq2SeqTrainingArguments(\n",
    "    output_dir=\"./\",\n",
    "    per_device_train_batch_size=64,\n",
    "    gradient_accumulation_steps=1,  # increase by 2x for every 2x decrease in batch size\n",
    "    learning_rate=1e-5,\n",
    "    warmup_steps=500,\n",
    "    max_steps=5000,\n",
    "    gradient_checkpointing=True,\n",
    "    fp16=True,\n",
    "    evaluation_strategy=\"steps\",\n",
    "    per_device_eval_batch_size=8,\n",
    "    predict_with_generate=True,\n",
    "    generation_max_length=225,\n",
    "    save_steps=1000,\n",
    "    eval_steps=1000,\n",
    "    logging_steps=25,\n",
    "    report_to=[\"tensorboard\"],\n",
    "    load_best_model_at_end=True,\n",
    "    metric_for_best_model=\"wer\",\n",
    "    greater_is_better=False,\n",
    "    push_to_hub=True,\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b3a944d8-3112-4552-82a0-be25988b3857",
   "metadata": {},
   "source": [
    "**Note**: if one does not want to upload the model checkpoints to the Hub, \n",
    "set `push_to_hub=False`."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "393c883e-3e50-492c-bd58-f51dbf15ee56",
   "metadata": {},
   "source": [
    "We then define a custom [Callback](https://huggingface.co/docs/transformers/main_classes/callback) that is called by the 🤗 Trainer on the end of each epoch. The Callback reinitialises and reshuffles the streaming dataset at the beginning of each new epoch - this gives different shuffling across our subsets for every epoch."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "3ac16b62-b3c0-4c68-8f3d-9ecf471534b2",
   "metadata": {},
   "outputs": [],
   "source": [
    "from transformers import TrainerCallback\n",
    "from transformers.trainer_pt_utils import IterableDatasetShard\n",
    "from torch.utils.data import IterableDataset\n",
    "\n",
    "# trainer callback to reinitialise and reshuffle the streamable datasets at the beginning of each epoch\n",
    "class ShuffleCallback(TrainerCallback):\n",
    "    def on_epoch_begin(self, args, state, control, train_dataloader, **kwargs):\n",
    "        if isinstance(train_dataloader.dataset, IterableDatasetShard):\n",
    "            pass  # set_epoch() is handled by the Trainer\n",
    "        elif isinstance(train_dataloader.dataset, IterableDataset):\n",
    "            train_dataloader.dataset.set_epoch(train_dataloader.dataset._epoch + 1)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bac29114-d226-4f54-97cf-8718c9f94e1e",
   "metadata": {},
   "source": [
    "We can forward the training arguments to the 🤗 Trainer along with our model,\n",
    "dataset, data collator, `compute_metrics` function and custom callback:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "d546d7fe-0543-479a-b708-2ebabec19493",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ubuntu/whisper-tiny-tgl/./ is already a clone of https://huggingface.co/marcderbauer/whisper-tiny-tgl. Make sure you pull the latest changes with `repo.git_pull()`.\n",
      "max_steps is given, it will override any value given in num_train_epochs\n",
      "Using cuda_amp half precision backend\n"
     ]
    }
   ],
   "source": [
    "from transformers import Seq2SeqTrainer\n",
    "\n",
    "trainer = Seq2SeqTrainer(\n",
    "    args=training_args,\n",
    "    model=model,\n",
    "    train_dataset=vectorized_datasets[\"train\"],\n",
    "    eval_dataset=vectorized_datasets[\"test\"],\n",
    "    data_collator=data_collator,\n",
    "    compute_metrics=compute_metrics,\n",
    "    tokenizer=processor,\n",
    "    callbacks=[ShuffleCallback()],\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "67ab88c3-7091-4e51-8ad5-f5cacbe18449",
   "metadata": {},
   "source": [
    "We'll save the model and processor to the output directory before training:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "a1ccb9ed-cbc8-4419-91c0-651e9424b672",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Configuration saved in ./config.json\n",
      "Model weights saved in ./pytorch_model.bin\n",
      "Feature extractor saved in ./preprocessor_config.json\n",
      "tokenizer config file saved in ./tokenizer_config.json\n",
      "Special tokens file saved in ./special_tokens_map.json\n",
      "added tokens file saved in ./added_tokens.json\n"
     ]
    }
   ],
   "source": [
    "model.save_pretrained(training_args.output_dir)\n",
    "processor.save_pretrained(training_args.output_dir)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7f404cf9-4345-468c-8196-4bd101d9bd51",
   "metadata": {},
   "source": [
    "### Training"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5e8b8d56-5a70-4f68-bd2e-f0752d0bd112",
   "metadata": {},
   "source": [
    "Training will take approximately 5-10 hours depending on your GPU. The peak GPU memory for the given training configuration is approximately 36GB. \n",
    "Depending on your GPU, it is possible that you will encounter a CUDA `\"out-of-memory\"` error when you launch training. \n",
    "In this case, you can reduce the `per_device_train_batch_size` incrementally by factors of 2 \n",
    "and employ [`gradient_accumulation_steps`](https://huggingface.co/docs/transformers/main_classes/trainer#transformers.Seq2SeqTrainingArguments.gradient_accumulation_steps)\n",
    "to compensate.\n",
    "\n",
    "To launch training, simply execute:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "ee8b7b8e-1c9a-4d77-9137-1778a629e6de",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "***** Running training *****\n",
      "  Num examples = 320000\n",
      "  Num Epochs = 9223372036854775807\n",
      "  Instantaneous batch size per device = 64\n",
      "  Total train batch size (w. parallel, distributed & accumulation) = 64\n",
      "  Gradient Accumulation steps = 1\n",
      "  Total optimization steps = 5000\n",
      "  Number of trainable parameters = 37760640\n",
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6dfea50>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6dfe900>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "The following columns in the training set don't have a corresponding argument in `WhisperForConditionalGeneration.forward` and have been ignored: input_length. If input_length are not expected by `WhisperForConditionalGeneration.forward`,  you can safely ignore this message.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-af3fa5ae-6544-4948-a2e4-93c28572bb0a.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i89df3375-5ef7-4e49-bf31-c22a4b6d021a.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "    <div>\n",
       "      \n",
       "      <progress value='115' max='5000' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
       "      [ 115/5000 18:30 < 13:20:13, 0.10 it/s, Epoch 56.00/9223372036854775807]\n",
       "    </div>\n",
       "    <table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       " <tr style=\"text-align: left;\">\n",
       "      <th>Step</th>\n",
       "      <th>Training Loss</th>\n",
       "      <th>Validation Loss</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table><p>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6dfe9e0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6dfe970>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-cb84d9a0-5212-43ff-bac2-0ede72dd35c6.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-f63d0ca4-c810-45a4-96ec-c0e0f4084706.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d8f3c0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6dfe970>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i24ebfbbe-1f29-43f4-87f4-9944e65d74ed.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i0e7493c6-5270-41b9-895b-224e0913d596.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0ce40>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cdd0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i2ab4f58e-c5a8-4f02-ae58-0a72867170f5.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i388adb36-b6e7-4629-b6a6-6cd554df5bbb.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c9e0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cac0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-e9b803ab-b052-4fcc-829b-c0ee3df3ec7c.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i5b6fff43-466d-4427-ada8-26ae4c654a0a.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0cc10>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cc80>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-a0116d50-25ae-43e7-a05a-11ca7ebe590e.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i47391d09-db79-4c56-9d6d-88577d5beb3b.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0cc80>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c900>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-cdb41602-9bd7-4479-8116-898314069dbf.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-f68637d5-7d47-440c-8677-783cdd82807a.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cac0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-b86db51f-943b-4e95-a9ca-2600c5f33571.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-c984c83d-ec4c-4999-acc4-d62d78b2c1a0.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0cac0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c430>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i7628fa79-e6dc-4733-9a51-42f7c41f5a4d.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i66c18c70-3642-484f-9b5e-dfc4b15f6b4b.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0ca50>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cc10>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-f06d4cfc-7b65-460f-9743-2181d5f5401e.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i5d2e4b46-a1c7-4e04-b69d-b069f3aa18b7.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c3c0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-a21cf243-f64c-47b2-bc25-f4e831f88cf1.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i88dc2742-243e-44c5-bc35-27cbdd3e28eb.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c3c0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0ce40>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i960f99d6-1433-4639-9580-faeb02c618fd.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-a7630fad-0635-4313-86f1-943da03f2e68.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0ca50>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c890>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i1ca42afd-ce11-463d-8abf-304cb26d46cb.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-ec26fe3a-1a02-423d-8d33-bb3f70fa3b7b.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0ca50>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c890>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i118e8f74-2b29-471f-b718-fe8d2b296dea.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i0740bf17-14b0-44a8-95e5-633632ee1221.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0ce40>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c900>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i3d30e962-c261-41db-9768-ee953e86138d.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-cdb41602-9bd7-4479-8116-898314069dbf.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c900>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cac0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-a4cf9098-e6c6-4515-b423-1235170f4007.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i82384eae-0c6b-4553-8187-00541bd4ab68.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0ccf0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cc10>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i86475264-f3b6-46ff-8da8-8320845f3132.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-de5c4745-2d3f-4871-ac53-3ad0d539126b.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c430>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i9d08aac1-f029-489f-8aaf-cfc65168666c.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i627d0769-11e1-41aa-8692-2a99313cfdbc.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c890>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-f1b0b533-f481-4d46-b802-764a7f3ec812.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-c9d28e99-1723-41a0-b412-a55bcfff7969.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c890>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c900>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-d2c6e696-84d7-4e66-840e-75fd4515cc71.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-ca4cd50a-de0d-4c7e-8521-ea535017aac4.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c900>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0ccf0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-cf904aaf-29de-4082-af34-bcba42d6f214.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-fafc940f-86b0-4d7f-bd59-24ea3ce34955.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0ccf0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c430>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i20ecad13-a438-48da-8514-2c7acc8c3185.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i9ddbea05-0ce7-4d40-84f0-2fc1eb751a76.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c430>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c660>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i2f0bd373-ed2a-4518-a307-b0d81d8faa07.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i84964b1f-3457-4e90-93b2-fad25d3617d0.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0ccf0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cc80>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i24bb6122-b17c-473d-9046-649870e8100c.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i67c1ac4c-f4c2-4945-8106-dec4f219f1ff.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0cc80>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cac0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i118e8f74-2b29-471f-b718-fe8d2b296dea.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i9f6b65f7-f81b-4a92-ab87-28e048eba279.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c660>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cc10>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i71bc773b-1d7c-47bc-b767-7b4ee4dbb6ba.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i3f0504d9-deb1-4e54-b1bd-c077cbe02a7b.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0cc10>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c430>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i7caca876-f015-4740-bbeb-8956da76fe38.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i61910a52-aa3a-4afe-bac5-c9f47647e6f3.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0cc10>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c430>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i2158ee58-6974-4172-9db9-040ee28b791f.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i84964b1f-3457-4e90-93b2-fad25d3617d0.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c430>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-b5a6ce88-575a-47ff-93e8-6937d976d820.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-de62d0c9-f250-4e87-b94b-c5af54a61dab.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9de40>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i0740bf17-14b0-44a8-95e5-633632ee1221.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i990db079-9380-4a98-82d0-d475e508eee7.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9d900>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i81592bb8-89c4-4831-80ab-fc20a1a6b0c9.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i61ef7c65-78d2-434e-b381-c9a07cec8f22.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9dba0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-b5a6ce88-575a-47ff-93e8-6937d976d820.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i996ba5f7-da3c-454f-960e-3e2e25d0947f.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9d890>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i6b97833d-fd7d-4bde-a21c-cf842a316a5d.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i7caca876-f015-4740-bbeb-8956da76fe38.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9da50>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i788396e8-f7fc-4bdb-8521-6f0574b7cb9c.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i72cae8f4-cf18-4a31-8ae9-5c4dcd7ad553.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9dc80>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i7f363e42-caee-420f-8280-7f0a448a8297.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i15b8d06b-0b1f-4b07-9a74-a2fea3eafe6e.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9ddd0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-e8abc0ee-6e67-4954-8183-f47009a17065.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i304e022a-1a50-4e28-bc1f-4db5ef1491fc.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9dd60>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-b86db51f-943b-4e95-a9ca-2600c5f33571.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i98c3fa6a-8838-4840-8b82-b199b93007ab.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9de40>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i9860426b-fdf7-4bc6-8e62-2944dac3a87b.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i3789caa7-1f03-4abb-a8ef-884d2025a441.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0ce40>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cac0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i44706917-2f4c-46d7-95b5-82ab99549552.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-cae2cad0-4f37-4711-ad2b-ee1465f9e97b.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c510>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c890>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i2f9c5b7b-6533-47c6-802b-4fb9a845b9fd.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i996ba5f7-da3c-454f-960e-3e2e25d0947f.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9dd60>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c890>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i3968e429-8460-4d96-8d71-0359ab10f12e.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i672bd3aa-9303-433d-bfc9-416c9e859838.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9dc80>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c890>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i89a0bf33-e8bf-4e79-9f70-dc672d8b5746.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i497e2f3b-51b4-4b37-a3fc-24053d755707.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9d6d0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c890>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i5d6d1a01-c522-434a-8591-9bb3479f6183.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-cb5669ac-d537-4f75-b27b-30b8c38031ea.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c510>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0ccf0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i5d2e4b46-a1c7-4e04-b69d-b069f3aa18b7.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-a01a8329-55cc-43f2-9f31-b1d88a3a17ed.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9d900>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0ccf0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-a0116d50-25ae-43e7-a05a-11ca7ebe590e.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i29e327ae-fd2f-474e-8d7b-b24e6eaac7cd.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9dc80>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0ccf0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i9d270ab7-9416-40b9-8b11-991fd169b94e.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i98c3fa6a-8838-4840-8b82-b199b93007ab.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9db30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0ccf0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-fc9aab86-fe11-46c6-9148-1d91357bd238.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i00c970d6-388d-4195-af16-a019a2177686.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9dd60>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0ccf0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-a7630fad-0635-4313-86f1-943da03f2e68.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-fcc09d40-56ba-4ada-9dcb-6e1f8c9cb3ff.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0ca50>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0ce40>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i79d705fd-796d-47b5-ba78-4b82c7bd57a9.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i0cf4886a-c491-444f-8a79-4a0581ea5f3c.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9d6d0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0ce40>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i138571f4-bc8f-4378-acb3-708bbdabee22.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i2ab4f58e-c5a8-4f02-ae58-0a72867170f5.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0cac0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c660>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-e1a7fd07-eee3-42ff-91a1-91a3d2fb6294.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-f4f66771-37e3-44fa-93c6-749604aeb4d1.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c510>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i388adb36-b6e7-4629-b6a6-6cd554df5bbb.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i0cf4886a-c491-444f-8a79-4a0581ea5f3c.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6e0c660>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-a56b1a3f-f410-4813-ad8e-484aad226182.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i90f7c3c2-84b8-4c5b-a323-c01f4d854260.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9ddd0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i98c3fa6a-8838-4840-8b82-b199b93007ab.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-e2583a7e-a10e-48ea-a575-02c1b7476e07.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9df90>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c900>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i3b21c151-87fb-4e97-8ccf-517986ddb1c4.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-cd03999e-af74-4ddc-8f88-be75cfafff28.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9ddd0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0cb30>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i162bdf3c-4447-4fbc-8660-cf0ba184102b.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i19d9ef42-b73c-4313-ab7d-24d885fc10ae.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9d6d0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0ccf0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i19d9ef42-b73c-4313-ab7d-24d885fc10ae.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i98c3fa6a-8838-4840-8b82-b199b93007ab.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/features/audio.py:315: UserWarning: \n",
      "To support 'mp3' decoding with `torchaudio>=0.12.0`, please install `ffmpeg4` system package. On Google Colab you can run:\n",
      "\n",
      "\t!add-apt-repository -y ppa:jonathonf/ffmpeg-4 && apt update && apt install -y ffmpeg\n",
      "\n",
      "and restart your runtime. Alternatively, you can downgrade `torchaudio`:\n",
      "\n",
      "\tpip install \"torchaudio<0.12\"`.\n",
      "\n",
      "Otherwise 'mp3' files will be decoded with `librosa`.\n",
      "  warnings.warn(\n",
      "/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/features/audio.py:336: UserWarning: Decoding mp3 with `librosa` instead of `torchaudio`, decoding might be slow.\n",
      "  warnings.warn(\"Decoding mp3 with `librosa` instead of `torchaudio`, decoding might be slow.\")\n",
      "/home/ubuntu/hf_env/lib/python3.8/site-packages/librosa/util/decorators.py:88: UserWarning: PySoundFile failed. Trying audioread instead.\n",
      "  return f(*args, **kwargs)\n",
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9dd60>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6d9da50>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object BloomSpeech._generate_examples at 0x7ff4f6d9ddd0>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n",
      "Exception ignored in: <generator object ShardShuffledExamplesIterable.__iter__ at 0x7ff4f6e0c900>\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/ubuntu/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py\", line 137, in __iter__\n",
      "    yield from self.generate_examples_fn(**kwargs_with_shuffled_shards)\n",
      "RuntimeError: generator ignored GeneratorExit\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i67d6d1a6-7974-46b3-9f28-b0df66f9dfab.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i470a80d8-f952-4abd-9ca3-78979ed837a6.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i98c3fa6a-8838-4840-8b82-b199b93007ab.mp3 failed to download. Data may be missing.\n",
      "https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i9860426b-fdf7-4bc6-8e62-2944dac3a87b.mp3 failed to download. Data may be missing.\n"
     ]
    },
    {
     "ename": "FileNotFoundError",
     "evalue": "[Errno 2] No such file or directory: 'https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i98c3fa6a-8838-4840-8b82-b199b93007ab.mp3'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mRuntimeError\u001b[0m                              Traceback (most recent call last)",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/features/audio.py:311\u001b[0m, in \u001b[0;36mAudio._decode_mp3\u001b[0;34m(self, path_or_file)\u001b[0m\n\u001b[1;32m    310\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:  \u001b[38;5;66;03m# try torchaudio anyway because sometimes it works (depending on the os and os packages installed)\u001b[39;00m\n\u001b[0;32m--> 311\u001b[0m     array, sampling_rate \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_decode_mp3_torchaudio\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath_or_file\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    312\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m:\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/features/audio.py:352\u001b[0m, in \u001b[0;36mAudio._decode_mp3_torchaudio\u001b[0;34m(self, path_or_file)\u001b[0m\n\u001b[1;32m    350\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mtorchaudio\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtransforms\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mT\u001b[39;00m\n\u001b[0;32m--> 352\u001b[0m array, sampling_rate \u001b[38;5;241m=\u001b[39m \u001b[43mtorchaudio\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath_or_file\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mformat\u001b[39;49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmp3\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m    353\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msampling_rate \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msampling_rate \u001b[38;5;241m!=\u001b[39m sampling_rate:\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/torchaudio/backend/sox_io_backend.py:246\u001b[0m, in \u001b[0;36mload\u001b[0;34m(filepath, frame_offset, num_frames, normalize, channels_first, format)\u001b[0m\n\u001b[1;32m    245\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m ret\n\u001b[0;32m--> 246\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_fallback_load\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mframe_offset\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mnum_frames\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mnormalize\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mchannels_first\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mformat\u001b[39;49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/torchaudio/io/_compat.py:103\u001b[0m, in \u001b[0;36mload_audio\u001b[0;34m(src, frame_offset, num_frames, convert, channels_first, format)\u001b[0m\n\u001b[1;32m     95\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mload_audio\u001b[39m(\n\u001b[1;32m     96\u001b[0m     src: \u001b[38;5;28mstr\u001b[39m,\n\u001b[1;32m     97\u001b[0m     frame_offset: \u001b[38;5;28mint\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m0\u001b[39m,\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m    101\u001b[0m     \u001b[38;5;28mformat\u001b[39m: Optional[\u001b[38;5;28mstr\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[1;32m    102\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Tuple[torch\u001b[38;5;241m.\u001b[39mTensor, \u001b[38;5;28mint\u001b[39m]:\n\u001b[0;32m--> 103\u001b[0m     s \u001b[38;5;241m=\u001b[39m \u001b[43mtorch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mclasses\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtorchaudio\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mffmpeg_StreamReader\u001b[49m\u001b[43m(\u001b[49m\u001b[43msrc\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mformat\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m    104\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m _load_audio(s, frame_offset, num_frames, convert, channels_first)\n",
      "\u001b[0;31mRuntimeError\u001b[0m: Failed to open the input \"https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i98c3fa6a-8838-4840-8b82-b199b93007ab.mp3\" (Input/output error).",
      "\nDuring handling of the above exception, another exception occurred:\n",
      "\u001b[0;31mLibsndfileError\u001b[0m                           Traceback (most recent call last)",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/librosa/core/audio.py:164\u001b[0m, in \u001b[0;36mload\u001b[0;34m(path, sr, mono, offset, duration, dtype, res_type)\u001b[0m\n\u001b[1;32m    163\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 164\u001b[0m     y, sr_native \u001b[38;5;241m=\u001b[39m \u001b[43m__soundfile_load\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43moffset\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mduration\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdtype\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    166\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m exc:\n\u001b[1;32m    167\u001b[0m     \u001b[38;5;66;03m# If soundfile failed, try audioread instead\u001b[39;00m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/librosa/core/audio.py:195\u001b[0m, in \u001b[0;36m__soundfile_load\u001b[0;34m(path, offset, duration, dtype)\u001b[0m\n\u001b[1;32m    193\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m    194\u001b[0m     \u001b[38;5;66;03m# Otherwise, create the soundfile object\u001b[39;00m\n\u001b[0;32m--> 195\u001b[0m     context \u001b[38;5;241m=\u001b[39m \u001b[43msf\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mSoundFile\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    197\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m context \u001b[38;5;28;01mas\u001b[39;00m sf_desc:\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/soundfile.py:655\u001b[0m, in \u001b[0;36mSoundFile.__init__\u001b[0;34m(self, file, mode, samplerate, channels, subtype, endian, format, closefd)\u001b[0m\n\u001b[1;32m    653\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_info \u001b[38;5;241m=\u001b[39m _create_info_struct(file, mode, samplerate, channels,\n\u001b[1;32m    654\u001b[0m                                  \u001b[38;5;28mformat\u001b[39m, subtype, endian)\n\u001b[0;32m--> 655\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_file \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_open\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmode_int\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mclosefd\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    656\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mset\u001b[39m(mode)\u001b[38;5;241m.\u001b[39missuperset(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mr+\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mseekable():\n\u001b[1;32m    657\u001b[0m     \u001b[38;5;66;03m# Move write position to 0 (like in Python file objects)\u001b[39;00m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/soundfile.py:1213\u001b[0m, in \u001b[0;36mSoundFile._open\u001b[0;34m(self, file, mode_int, closefd)\u001b[0m\n\u001b[1;32m   1212\u001b[0m     err \u001b[38;5;241m=\u001b[39m _snd\u001b[38;5;241m.\u001b[39msf_error(file_ptr)\n\u001b[0;32m-> 1213\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m LibsndfileError(err, prefix\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mError opening \u001b[39m\u001b[38;5;132;01m{0!r}\u001b[39;00m\u001b[38;5;124m: \u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname))\n\u001b[1;32m   1214\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m mode_int \u001b[38;5;241m==\u001b[39m _snd\u001b[38;5;241m.\u001b[39mSFM_WRITE:\n\u001b[1;32m   1215\u001b[0m     \u001b[38;5;66;03m# Due to a bug in libsndfile version <= 1.0.25, frames != 0\u001b[39;00m\n\u001b[1;32m   1216\u001b[0m     \u001b[38;5;66;03m# when opening a named pipe in SFM_WRITE mode.\u001b[39;00m\n\u001b[1;32m   1217\u001b[0m     \u001b[38;5;66;03m# See http://github.com/erikd/libsndfile/issues/77.\u001b[39;00m\n",
      "\u001b[0;31mLibsndfileError\u001b[0m: Error opening 'https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i98c3fa6a-8838-4840-8b82-b199b93007ab.mp3': System error.",
      "\nDuring handling of the above exception, another exception occurred:\n",
      "\u001b[0;31mFileNotFoundError\u001b[0m                         Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[47], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mtrainer\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtrain\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/transformers/trainer.py:1534\u001b[0m, in \u001b[0;36mTrainer.train\u001b[0;34m(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs)\u001b[0m\n\u001b[1;32m   1529\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodel_wrapped \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodel\n\u001b[1;32m   1531\u001b[0m inner_training_loop \u001b[38;5;241m=\u001b[39m find_executable_batch_size(\n\u001b[1;32m   1532\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_inner_training_loop, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_train_batch_size, args\u001b[38;5;241m.\u001b[39mauto_find_batch_size\n\u001b[1;32m   1533\u001b[0m )\n\u001b[0;32m-> 1534\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43minner_training_loop\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m   1535\u001b[0m \u001b[43m    \u001b[49m\u001b[43margs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1536\u001b[0m \u001b[43m    \u001b[49m\u001b[43mresume_from_checkpoint\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mresume_from_checkpoint\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1537\u001b[0m \u001b[43m    \u001b[49m\u001b[43mtrial\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtrial\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1538\u001b[0m \u001b[43m    \u001b[49m\u001b[43mignore_keys_for_eval\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mignore_keys_for_eval\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1539\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/transformers/trainer.py:1756\u001b[0m, in \u001b[0;36mTrainer._inner_training_loop\u001b[0;34m(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval)\u001b[0m\n\u001b[1;32m   1753\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_load_rng_state(resume_from_checkpoint)\n\u001b[1;32m   1755\u001b[0m step \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m\n\u001b[0;32m-> 1756\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m step, inputs \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28menumerate\u001b[39m(epoch_iterator):\n\u001b[1;32m   1757\u001b[0m \n\u001b[1;32m   1758\u001b[0m     \u001b[38;5;66;03m# Skip past any already trained steps if resuming training\u001b[39;00m\n\u001b[1;32m   1759\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m steps_trained_in_current_epoch \u001b[38;5;241m>\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[1;32m   1760\u001b[0m         steps_trained_in_current_epoch \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/torch/utils/data/dataloader.py:628\u001b[0m, in \u001b[0;36m_BaseDataLoaderIter.__next__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    625\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_sampler_iter \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m    626\u001b[0m     \u001b[38;5;66;03m# TODO(https://github.com/pytorch/pytorch/issues/76750)\u001b[39;00m\n\u001b[1;32m    627\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_reset()  \u001b[38;5;66;03m# type: ignore[call-arg]\u001b[39;00m\n\u001b[0;32m--> 628\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_next_data\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    629\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_num_yielded \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[1;32m    630\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_dataset_kind \u001b[38;5;241m==\u001b[39m _DatasetKind\u001b[38;5;241m.\u001b[39mIterable \u001b[38;5;129;01mand\u001b[39;00m \\\n\u001b[1;32m    631\u001b[0m         \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_IterableDataset_len_called \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m \\\n\u001b[1;32m    632\u001b[0m         \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_num_yielded \u001b[38;5;241m>\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_IterableDataset_len_called:\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/torch/utils/data/dataloader.py:671\u001b[0m, in \u001b[0;36m_SingleProcessDataLoaderIter._next_data\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    669\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_next_data\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m    670\u001b[0m     index \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_next_index()  \u001b[38;5;66;03m# may raise StopIteration\u001b[39;00m\n\u001b[0;32m--> 671\u001b[0m     data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_dataset_fetcher\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfetch\u001b[49m\u001b[43m(\u001b[49m\u001b[43mindex\u001b[49m\u001b[43m)\u001b[49m  \u001b[38;5;66;03m# may raise StopIteration\u001b[39;00m\n\u001b[1;32m    672\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_pin_memory:\n\u001b[1;32m    673\u001b[0m         data \u001b[38;5;241m=\u001b[39m _utils\u001b[38;5;241m.\u001b[39mpin_memory\u001b[38;5;241m.\u001b[39mpin_memory(data, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_pin_memory_device)\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py:34\u001b[0m, in \u001b[0;36m_IterableDatasetFetcher.fetch\u001b[0;34m(self, possibly_batched_index)\u001b[0m\n\u001b[1;32m     32\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m _ \u001b[38;5;129;01min\u001b[39;00m possibly_batched_index:\n\u001b[1;32m     33\u001b[0m     \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m---> 34\u001b[0m         data\u001b[38;5;241m.\u001b[39mappend(\u001b[38;5;28;43mnext\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdataset_iter\u001b[49m\u001b[43m)\u001b[49m)\n\u001b[1;32m     35\u001b[0m     \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mStopIteration\u001b[39;00m:\n\u001b[1;32m     36\u001b[0m         \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mended \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py:849\u001b[0m, in \u001b[0;36mIterableDataset.__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    846\u001b[0m         \u001b[38;5;28;01myield from\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_iter_pytorch(worker_info)\n\u001b[1;32m    847\u001b[0m         \u001b[38;5;28;01mreturn\u001b[39;00m\n\u001b[0;32m--> 849\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m key, example \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_iter():\n\u001b[1;32m    850\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfeatures:\n\u001b[1;32m    851\u001b[0m         \u001b[38;5;66;03m# `IterableDataset` automatically fills missing columns with None.\u001b[39;00m\n\u001b[1;32m    852\u001b[0m         \u001b[38;5;66;03m# This is done with `_apply_feature_types_on_example`.\u001b[39;00m\n\u001b[1;32m    853\u001b[0m         \u001b[38;5;28;01myield\u001b[39;00m _apply_feature_types_on_example(\n\u001b[1;32m    854\u001b[0m             example, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfeatures, token_per_repo_id\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_token_per_repo_id\n\u001b[1;32m    855\u001b[0m         )\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py:791\u001b[0m, in \u001b[0;36mIterableDataset._iter\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    789\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m    790\u001b[0m     ex_iterable \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_ex_iterable\n\u001b[0;32m--> 791\u001b[0m \u001b[38;5;28;01myield from\u001b[39;00m ex_iterable\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py:522\u001b[0m, in \u001b[0;36mFilteredExamplesIterable.__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    520\u001b[0m         current_idx \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m batch_idx \u001b[38;5;241m+\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[1;32m    521\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 522\u001b[0m     \u001b[38;5;28;01mfor\u001b[39;00m key, example \u001b[38;5;129;01min\u001b[39;00m iterator:\n\u001b[1;32m    523\u001b[0m         \u001b[38;5;66;03m# If not batched, we can apply the filtering function direcly\u001b[39;00m\n\u001b[1;32m    524\u001b[0m         inputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mdict\u001b[39m(example)\n\u001b[1;32m    525\u001b[0m         function_args \u001b[38;5;241m=\u001b[39m [inputs] \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minput_columns \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m [inputs[col] \u001b[38;5;28;01mfor\u001b[39;00m col \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minput_columns]\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py:577\u001b[0m, in \u001b[0;36mBufferShuffledExamplesIterable.__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    575\u001b[0m \u001b[38;5;66;03m# this is the shuffle buffer that we keep in memory\u001b[39;00m\n\u001b[1;32m    576\u001b[0m mem_buffer \u001b[38;5;241m=\u001b[39m []\n\u001b[0;32m--> 577\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m x \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mex_iterable:\n\u001b[1;32m    578\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(mem_buffer) \u001b[38;5;241m==\u001b[39m buffer_size:  \u001b[38;5;66;03m# if the buffer is full, pick and example from it\u001b[39;00m\n\u001b[1;32m    579\u001b[0m         i \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mnext\u001b[39m(indices_iterator)\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py:430\u001b[0m, in \u001b[0;36mMappedExamplesIterable.__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    428\u001b[0m         current_idx \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m batch_idx \u001b[38;5;241m+\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[1;32m    429\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 430\u001b[0m     \u001b[38;5;28;01mfor\u001b[39;00m key, example \u001b[38;5;129;01min\u001b[39;00m iterator:\n\u001b[1;32m    431\u001b[0m         \u001b[38;5;66;03m# If not batched, we can apply the transform and yield the example directly\u001b[39;00m\n\u001b[1;32m    432\u001b[0m         \u001b[38;5;66;03m# first copy the example, since we might drop some keys\u001b[39;00m\n\u001b[1;32m    433\u001b[0m         example \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mdict\u001b[39m(example)\n\u001b[1;32m    434\u001b[0m         \u001b[38;5;66;03m# then apply the transform\u001b[39;00m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py:687\u001b[0m, in \u001b[0;36mTypedExamplesIterable.__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    684\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m__iter__\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m    685\u001b[0m     \u001b[38;5;66;03m# Then for each example, `TypedExamplesIterable` automatically fills missing columns with None.\u001b[39;00m\n\u001b[1;32m    686\u001b[0m     \u001b[38;5;66;03m# This is done with `_apply_feature_types_on_example`.\u001b[39;00m\n\u001b[0;32m--> 687\u001b[0m     \u001b[38;5;28;01mfor\u001b[39;00m key, example \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mex_iterable:\n\u001b[1;32m    688\u001b[0m         \u001b[38;5;28;01myield\u001b[39;00m key, _apply_feature_types_on_example(\n\u001b[1;32m    689\u001b[0m             example, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfeatures, token_per_repo_id\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtoken_per_repo_id\n\u001b[1;32m    690\u001b[0m         )\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py:430\u001b[0m, in \u001b[0;36mMappedExamplesIterable.__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    428\u001b[0m         current_idx \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m batch_idx \u001b[38;5;241m+\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[1;32m    429\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 430\u001b[0m     \u001b[38;5;28;01mfor\u001b[39;00m key, example \u001b[38;5;129;01min\u001b[39;00m iterator:\n\u001b[1;32m    431\u001b[0m         \u001b[38;5;66;03m# If not batched, we can apply the transform and yield the example directly\u001b[39;00m\n\u001b[1;32m    432\u001b[0m         \u001b[38;5;66;03m# first copy the example, since we might drop some keys\u001b[39;00m\n\u001b[1;32m    433\u001b[0m         example \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mdict\u001b[39m(example)\n\u001b[1;32m    434\u001b[0m         \u001b[38;5;66;03m# then apply the transform\u001b[39;00m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py:688\u001b[0m, in \u001b[0;36mTypedExamplesIterable.__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    684\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m__iter__\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m    685\u001b[0m     \u001b[38;5;66;03m# Then for each example, `TypedExamplesIterable` automatically fills missing columns with None.\u001b[39;00m\n\u001b[1;32m    686\u001b[0m     \u001b[38;5;66;03m# This is done with `_apply_feature_types_on_example`.\u001b[39;00m\n\u001b[1;32m    687\u001b[0m     \u001b[38;5;28;01mfor\u001b[39;00m key, example \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mex_iterable:\n\u001b[0;32m--> 688\u001b[0m         \u001b[38;5;28;01myield\u001b[39;00m key, \u001b[43m_apply_feature_types_on_example\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m    689\u001b[0m \u001b[43m            \u001b[49m\u001b[43mexample\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfeatures\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtoken_per_repo_id\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtoken_per_repo_id\u001b[49m\n\u001b[1;32m    690\u001b[0m \u001b[43m        \u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/iterable_dataset.py:653\u001b[0m, in \u001b[0;36m_apply_feature_types_on_example\u001b[0;34m(example, features, token_per_repo_id)\u001b[0m\n\u001b[1;32m    651\u001b[0m encoded_example \u001b[38;5;241m=\u001b[39m features\u001b[38;5;241m.\u001b[39mencode_example(example)\n\u001b[1;32m    652\u001b[0m \u001b[38;5;66;03m# Decode example for Audio feature, e.g.\u001b[39;00m\n\u001b[0;32m--> 653\u001b[0m decoded_example \u001b[38;5;241m=\u001b[39m \u001b[43mfeatures\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdecode_example\u001b[49m\u001b[43m(\u001b[49m\u001b[43mencoded_example\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtoken_per_repo_id\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtoken_per_repo_id\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    654\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m decoded_example\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/features/features.py:1835\u001b[0m, in \u001b[0;36mFeatures.decode_example\u001b[0;34m(self, example, token_per_repo_id)\u001b[0m\n\u001b[1;32m   1821\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdecode_example\u001b[39m(\u001b[38;5;28mself\u001b[39m, example: \u001b[38;5;28mdict\u001b[39m, token_per_repo_id: Optional[Dict[\u001b[38;5;28mstr\u001b[39m, Union[\u001b[38;5;28mstr\u001b[39m, \u001b[38;5;28mbool\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m]]] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m):\n\u001b[1;32m   1822\u001b[0m     \u001b[38;5;124;03m\"\"\"Decode example with custom feature decoding.\u001b[39;00m\n\u001b[1;32m   1823\u001b[0m \n\u001b[1;32m   1824\u001b[0m \u001b[38;5;124;03m    Args:\u001b[39;00m\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m   1832\u001b[0m \u001b[38;5;124;03m        `dict[str, Any]`\u001b[39;00m\n\u001b[1;32m   1833\u001b[0m \u001b[38;5;124;03m    \"\"\"\u001b[39;00m\n\u001b[0;32m-> 1835\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m {\n\u001b[1;32m   1836\u001b[0m         column_name: decode_nested_example(feature, value, token_per_repo_id\u001b[38;5;241m=\u001b[39mtoken_per_repo_id)\n\u001b[1;32m   1837\u001b[0m         \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_column_requires_decoding[column_name]\n\u001b[1;32m   1838\u001b[0m         \u001b[38;5;28;01melse\u001b[39;00m value\n\u001b[1;32m   1839\u001b[0m         \u001b[38;5;28;01mfor\u001b[39;00m column_name, (feature, value) \u001b[38;5;129;01min\u001b[39;00m zip_dict(\n\u001b[1;32m   1840\u001b[0m             {key: value \u001b[38;5;28;01mfor\u001b[39;00m key, value \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mitems() \u001b[38;5;28;01mif\u001b[39;00m key \u001b[38;5;129;01min\u001b[39;00m example}, example\n\u001b[1;32m   1841\u001b[0m         )\n\u001b[1;32m   1842\u001b[0m     }\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/features/features.py:1836\u001b[0m, in \u001b[0;36m<dictcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m   1821\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdecode_example\u001b[39m(\u001b[38;5;28mself\u001b[39m, example: \u001b[38;5;28mdict\u001b[39m, token_per_repo_id: Optional[Dict[\u001b[38;5;28mstr\u001b[39m, Union[\u001b[38;5;28mstr\u001b[39m, \u001b[38;5;28mbool\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m]]] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m):\n\u001b[1;32m   1822\u001b[0m     \u001b[38;5;124;03m\"\"\"Decode example with custom feature decoding.\u001b[39;00m\n\u001b[1;32m   1823\u001b[0m \n\u001b[1;32m   1824\u001b[0m \u001b[38;5;124;03m    Args:\u001b[39;00m\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m   1832\u001b[0m \u001b[38;5;124;03m        `dict[str, Any]`\u001b[39;00m\n\u001b[1;32m   1833\u001b[0m \u001b[38;5;124;03m    \"\"\"\u001b[39;00m\n\u001b[1;32m   1835\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m {\n\u001b[0;32m-> 1836\u001b[0m         column_name: \u001b[43mdecode_nested_example\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfeature\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtoken_per_repo_id\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtoken_per_repo_id\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1837\u001b[0m         \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_column_requires_decoding[column_name]\n\u001b[1;32m   1838\u001b[0m         \u001b[38;5;28;01melse\u001b[39;00m value\n\u001b[1;32m   1839\u001b[0m         \u001b[38;5;28;01mfor\u001b[39;00m column_name, (feature, value) \u001b[38;5;129;01min\u001b[39;00m zip_dict(\n\u001b[1;32m   1840\u001b[0m             {key: value \u001b[38;5;28;01mfor\u001b[39;00m key, value \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mitems() \u001b[38;5;28;01mif\u001b[39;00m key \u001b[38;5;129;01min\u001b[39;00m example}, example\n\u001b[1;32m   1841\u001b[0m         )\n\u001b[1;32m   1842\u001b[0m     }\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/features/features.py:1298\u001b[0m, in \u001b[0;36mdecode_nested_example\u001b[0;34m(schema, obj, token_per_repo_id)\u001b[0m\n\u001b[1;32m   1295\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(schema, (Audio, Image)):\n\u001b[1;32m   1296\u001b[0m     \u001b[38;5;66;03m# we pass the token to read and decode files from private repositories in streaming mode\u001b[39;00m\n\u001b[1;32m   1297\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m obj \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m schema\u001b[38;5;241m.\u001b[39mdecode:\n\u001b[0;32m-> 1298\u001b[0m         \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mschema\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdecode_example\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtoken_per_repo_id\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtoken_per_repo_id\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1299\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m obj\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/features/audio.py:154\u001b[0m, in \u001b[0;36mAudio.decode_example\u001b[0;34m(self, value, token_per_repo_id)\u001b[0m\n\u001b[1;32m    152\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mAn audio sample should have one of \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mpath\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m or \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbytes\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m but both are None in \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mvalue\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m    153\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m path \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m path\u001b[38;5;241m.\u001b[39mendswith(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmp3\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[0;32m--> 154\u001b[0m     array, sampling_rate \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_decode_mp3\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mif\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mfile\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01melse\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    155\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m path \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m path\u001b[38;5;241m.\u001b[39mendswith(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mopus\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m    156\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m file:\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/features/audio.py:339\u001b[0m, in \u001b[0;36mAudio._decode_mp3\u001b[0;34m(self, path_or_file)\u001b[0m\n\u001b[1;32m    337\u001b[0m     _librosa_warned \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[1;32m    338\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 339\u001b[0m     array, sampling_rate \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_decode_mp3_librosa\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath_or_file\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    340\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m err:\n\u001b[1;32m    341\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[1;32m    342\u001b[0m         \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mDecoding of \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmp3\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m failed, probably because of streaming mode \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m    343\u001b[0m         \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m(`librosa` cannot decode \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmp3\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m file-like objects, only path-like).\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m    344\u001b[0m     ) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01merr\u001b[39;00m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/datasets/features/audio.py:373\u001b[0m, in \u001b[0;36mAudio._decode_mp3_librosa\u001b[0;34m(self, path_or_file)\u001b[0m\n\u001b[1;32m    371\u001b[0m     \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m    372\u001b[0m         _audioread_warned \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[0;32m--> 373\u001b[0m     array, sampling_rate \u001b[38;5;241m=\u001b[39m \u001b[43mlibrosa\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath_or_file\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmono\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmono\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msr\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msampling_rate\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    375\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m array, sampling_rate\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/librosa/util/decorators.py:88\u001b[0m, in \u001b[0;36mdeprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m     86\u001b[0m extra_args \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mlen\u001b[39m(args) \u001b[38;5;241m-\u001b[39m \u001b[38;5;28mlen\u001b[39m(all_args)\n\u001b[1;32m     87\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m extra_args \u001b[38;5;241m<\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[0;32m---> 88\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mf\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m     90\u001b[0m \u001b[38;5;66;03m# extra_args > 0\u001b[39;00m\n\u001b[1;32m     91\u001b[0m args_msg \u001b[38;5;241m=\u001b[39m [\n\u001b[1;32m     92\u001b[0m     \u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m=\u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(name, arg)\n\u001b[1;32m     93\u001b[0m     \u001b[38;5;28;01mfor\u001b[39;00m name, arg \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mzip\u001b[39m(kwonly_args[:extra_args], args[\u001b[38;5;241m-\u001b[39mextra_args:])\n\u001b[1;32m     94\u001b[0m ]\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/librosa/core/audio.py:170\u001b[0m, in \u001b[0;36mload\u001b[0;34m(path, sr, mono, offset, duration, dtype, res_type)\u001b[0m\n\u001b[1;32m    168\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(path, (\u001b[38;5;28mstr\u001b[39m, pathlib\u001b[38;5;241m.\u001b[39mPurePath)):\n\u001b[1;32m    169\u001b[0m     warnings\u001b[38;5;241m.\u001b[39mwarn(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mPySoundFile failed. Trying audioread instead.\u001b[39m\u001b[38;5;124m\"\u001b[39m, stacklevel\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m2\u001b[39m)\n\u001b[0;32m--> 170\u001b[0m     y, sr_native \u001b[38;5;241m=\u001b[39m \u001b[43m__audioread_load\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43moffset\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mduration\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdtype\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    171\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m    172\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m exc\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/librosa/core/audio.py:226\u001b[0m, in \u001b[0;36m__audioread_load\u001b[0;34m(path, offset, duration, dtype)\u001b[0m\n\u001b[1;32m    223\u001b[0m     reader \u001b[38;5;241m=\u001b[39m path\n\u001b[1;32m    224\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m    225\u001b[0m     \u001b[38;5;66;03m# If the input was not an audioread object, try to open it\u001b[39;00m\n\u001b[0;32m--> 226\u001b[0m     reader \u001b[38;5;241m=\u001b[39m \u001b[43maudioread\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43maudio_open\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    228\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m reader \u001b[38;5;28;01mas\u001b[39;00m input_file:\n\u001b[1;32m    229\u001b[0m     sr_native \u001b[38;5;241m=\u001b[39m input_file\u001b[38;5;241m.\u001b[39msamplerate\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/audioread/__init__.py:127\u001b[0m, in \u001b[0;36maudio_open\u001b[0;34m(path, backends)\u001b[0m\n\u001b[1;32m    125\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m BackendClass \u001b[38;5;129;01min\u001b[39;00m backends:\n\u001b[1;32m    126\u001b[0m     \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 127\u001b[0m         \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mBackendClass\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    128\u001b[0m     \u001b[38;5;28;01mexcept\u001b[39;00m DecodeError:\n\u001b[1;32m    129\u001b[0m         \u001b[38;5;28;01mpass\u001b[39;00m\n",
      "File \u001b[0;32m~/hf_env/lib/python3.8/site-packages/audioread/rawread.py:59\u001b[0m, in \u001b[0;36mRawAudioFile.__init__\u001b[0;34m(self, filename)\u001b[0m\n\u001b[1;32m     58\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m__init__\u001b[39m(\u001b[38;5;28mself\u001b[39m, filename):\n\u001b[0;32m---> 59\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_fh \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mfilename\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mrb\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m     61\u001b[0m     \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m     62\u001b[0m         \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_file \u001b[38;5;241m=\u001b[39m aifc\u001b[38;5;241m.\u001b[39mopen(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_fh)\n",
      "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'https://s3.amazonaws.com/bloom-speech/audio/tgl-0000-i98c3fa6a-8838-4840-8b82-b199b93007ab.mp3'"
     ]
    }
   ],
   "source": [
    "trainer.train()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "747c6a6e",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "(note that training may take some time to commence as we load the first training data samples with streaming mode)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "810ced54-7187-4a06-b2fe-ba6dcca94dc3",
   "metadata": {},
   "source": [
    "We can label our checkpoint with the `whisper-event` tag on push by setting the appropriate key-word arguments (kwargs):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "6dd0e310-9b07-4133-ac14-2ed2d7524e22",
   "metadata": {},
   "outputs": [],
   "source": [
    "kwargs = {\n",
    "    \"dataset_tags\": \"sil-ai/bloom-speech\",\n",
    "    \"dataset\": \"Bloom Speech Tagalog\",  # a 'pretty' name for the training dataset\n",
    "    \"language\": \"tgl\",\n",
    "    \"model_name\": \"Whisper Tiny Tgl - Marc-Anthony\",  # a 'pretty' name for your model\n",
    "    \"finetuned_from\": \"openai/whisper-tiny\",\n",
    "    \"tasks\": \"automatic-speech-recognition\",\n",
    "    \"tags\": \"whisper-event\",\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "090d676a-f944-4297-a938-a40eda0b2b68",
   "metadata": {},
   "source": [
    "The training results can now be uploaded to the Hub. To do so, execute the `push_to_hub` command:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "95737cda-c5dd-4887-a4d0-dfcb0d61d977",
   "metadata": {},
   "outputs": [],
   "source": [
    "trainer.push_to_hub(**kwargs)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "hf_env",
   "language": "python",
   "name": "hf_env"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}