DM2-ND/CFLP

_pickle.UnpicklingError

remember9069 opened this issue · 4 comments

I got this running 3rd example 'main.py --dataset facebook --metric hits@20 --alpha 1e-3 --beta 1e-3 --gamma 30 --lr 0.005 --embraw mvgrl --t louvain --neg_rate 1 --jk_mode mean --trail 20'

Traceback (most recent call last):
File "/content/drive/MyDrive/CFLP-main/main.py", line 338, in
main(args)
File "/content/drive/MyDrive/CFLP-main/main.py", line 327, in main
res = train(args, logger)
File "/content/drive/MyDrive/CFLP-main/main.py", line 84, in train
T_f, edges_cf_t1, edges_cf_t0, T_cf, adj_cf = load_t_files(args, T_file, logger, adj_train)
File "/content/drive/MyDrive/CFLP-main/cf_utils.py", line 28, in load_t_files
T_f, T_cf, adj_cf, edges_cf_t0, edges_cf_t1 = pickle.load(open(T_file, 'rb'))
_pickle.UnpicklingError: A load persistent id instruction was encountered,
but no persistent_load function was specified.

I cannot reproduce this error. Here's what I got when trying to load that file (seems working fine):

>>> import pickle
>>> dat = pickle.load(open('facebook_louvain2-euclidean30.0-mvgrl.pkl', 'rb'))
>>> dat[0]
<4039x4039 sparse matrix of type '<class 'numpy.int64'>'
	with 1532529 stored elements in Compressed Sparse Row format>

I'm not sure how to solve that pickle problem. Did you use the same environment setting as I specified in requirements?

Thanks for the reply.
I do have the same envs as you mentioned. May I ask for the python version that you run this project with?

Our enviroment had Python 3.8.5 and PyTorch 1.6.0. Hope that helps.

Thanks for your information.
I have no idea why the error occurred, the 1st dataset runs, but the 3rd one does not.
Thank you anyway.