In your preprocess code, item new remap id start from 1, and 0 for padding item id.
But in train.evaluate_full function, D, I = gpu_index.search(user_embs, topN), I may contains 0, since item_cate_map dont have 0 as key, so an error occurred in compute_diversity function.
Two error example logs are shown below
GRU4REC_5.LOG
DNN_5_taobao.LOG