Traceback (most recent call last):


 "model.py", line 47, in <module>

model_train(df, encoders, args, model)


 "../automodel/automl_train/pipeline.py", line 408, in model_train

for train_indices, val_indices in split.split(np.zeros(y.shape[0]), y):


 "/usr/local/lib/python3.7/site-packages/sklearn/model_selection/_split.py", line 1315, in split

for train, test in self._iter_indices(X, y, groups):


 "/usr/local/lib/python3.7/site-packages/sklearn/model_selection/_split.py", line 1695, in _iter_indices

raise ValueError("The least populated class in y has only 1"
ValueError: The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2.

Traceback (most recent call last):


 "/home/qiming/workspace/pytorch-deeplab-xception/my_train.py", line 318, in <module>

main()


 "/home/qiming/workspace/pytorch-deeplab-xception/my_train.py", line 305, in main

trainer = Trainer(args)


 "/home/qiming/workspace/pytorch-deeplab-xception/my_train.py", line 95, in __init__

self.optimizer.load_state_dict(checkpoint['optimizer'])


 "/home/qiming/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/optim/optimizer.py", line 114, in load_state_dict

raise ValueError("loaded state dict contains a parameter group "
ValueError: loaded state dict contains a parameter group that doesn't match the size of optimizer's group
