If the number of classes is set to one, you don’t really have a valid use case, since a simple model predicting zeros for all samples would achieve an accuracy of 100% (there are no other classes in the end).
Also, since the target contains a class index of 1, this indicates that at least two classes are expected (target values would be at least [0, 1]).