@gphilip i have 5 stratified folds for cross validation,so if i choose fold = 1,then
df_valid = df_folds[df_folds[“fold”] == fold].reset_index(drop=True)
df_valid will take all the samples from dataframe where fold == 1 and all other samples will be used for training,in fold column i have 1-5 values as you can see from this :
id	                      target                	file_path	                                               fold
0	0000799a2b2c42d	0	/home/apsisdev/data/seti/seti-breakthrough-lis…	1
1	00042890562ff68	0	/home/apsisdev/data/seti/seti-breakthrough-lis…	1
2	0005364cdcb8e5b	0	/home/apsisdev/data/seti/seti-breakthrough-lis…	4
3	0007a5a46901c56	0	/home/apsisdev/data/seti/seti-breakthrough-lis…	2
4	0009283e145448e	0	/home/apsisdev/data/seti/seti-breakthrough-lis…	3
…	…	…	…	…
59995	fff8217fe05aba3	0	/home/apsisdev/data/seti/seti-breakthrough-lis…	3
59996	fffa939e610ed70	0	/home/apsisdev/data/seti/seti-breakthrough-lis…	4
59997	fffbb1c9c3d6c31	1	/home/apsisdev/data/seti/seti-breakthrough-lis…	3
59998	fffc9a763d23647	0	/home/apsisdev/data/seti/seti-breakthrough-lis…	2
59999	ffff0a799efa529	0	/home/apsisdev/data/seti/seti-breakthrough-lis…	1
id target file_path fold
now i understand my silly mistake…while training i was doing this :
model_pretrained = AlienSingleHead(config=config, pretrained=True)
train_loop(
model_pretrained, df_folds, config, fold_num=0, train_one_fold=True, neptune=None
)
where my fold starts from 1 and not from 0,so this silly mistake causes df_valid to contain 0 samples…for first fold training i need to do this :
model_pretrained = AlienSingleHead(config=config, pretrained=True)
train_loop(
model_pretrained, df_folds, config, fold_num=1, train_one_fold=True, neptune=None
)
and then everything is fine,thank you for your time