Tabular Learner returns same value for all predictions

Hi,
I just got started with tabular data and decided to work on Titanic dataset in kaggle.
I’m facing an issue where learner.get_preds returns the same value for all rows.

I read train and test csv into a dataframe. Then used this to create my databunch:

dep_var='Survived’
cat_names=[‘Pclass’,‘Sex’,‘Cabin’,‘Embarked’]
cont_names=[‘Age’,‘SibSp’,‘Parch’,‘Fare’]
procs=[Categorify]

data=TabularDataBunch.from_df(path,df,dep_var,valid_idx=range(650,700),
cat_names=cat_names,procs=procs,
test_df=test_df)

After training with 88% accuracy, I called learner.get_preds :

learner.get_preds(ds_type=DatasetType.Test)

But this was the result :

Obviously I’m doing something wrong here.
Kindly point them out.

Thanks in advance.

NVM got it.

This works :
predictions, *_ = learner.get_preds(DatasetType.Test)
labels = np.argmax(predictions, 1)