Classe Order in Multi prediction

How to impose a class order in multi label modeling.
I am getting different class order sometimes, and it bugs me. How I can impose a specific label order when creating the data?
Just to clarify, I created a model, trained it and predict, the class order was:
['a', 'b', 'c']
Now I loaded more data, and when I do

data.classes
>>]'b', 'a', 'c']

I get a different order.
So my old initial trained model (and weights) don’t “work” with this new data order, how I can create the Databunch object with the order I want in the output?

In previous versions, the class order was obtained from the first appearance of each label in the training dataset. This is not practical for me.

It’s weird, they’re coded in order though.
You can always pass your classes when you create the labels.

I am using the block api, and a model that was trained before with the old ImageDataBunch.from_df.
Where I should pass the label order? in .label_from_df ?

There, and you can pass classes=bla to use this specific list of class (in that order).

1 Like

thanks, it works for me.