Do I have to use both learn save and export to save both model architecture and weights?

I now tried an export, but then somehow I can’t do a batch scoring of the testfile from the databunch anymore when reloading the exported model.

#export the learner
learn.export()

#reload
path = Path()
learn=load_learner(path=path,file=‘export.pkl’)

#reload databunch
data=load_data(path,‘train_and_valid_and_test_data’)

#batch scoring the test part of the databunch
preds, pred_values = get_preds_as_nparray(DatasetType.Test)
predicted=pd.DataFrame(pred_values)
predicted.columns=[‘predicted’]
testcf=df_test.join(predicted)
pd.crosstab(testcf.ylabel, testcf.predicted, margins=True, margins_name=“Total”)

gives an error:

I can get a prediction for a single line when loading my testdata back in from a pickle file:
df_test=pd.read_pickle(“df_test”)
i=0
predictie=learn.predict(df_test[‘tekst_cleaned’][i])
but then predictie[0] is a Category and I don’t know how to add this to a numpy array so that I can use a for loop to make the predictions for each line of df_test.