mickeysjm / TaxoExpan

The source code used for self-supervised taxonomy expansion method TaxoExpan, published in WWW 2020
Apache License 2.0
75 stars 18 forks source link

AttributeError: 'KeyedVectors' object has no attribute 'add' #6

Closed GitHubBoys closed 2 years ago

GitHubBoys commented 2 years ago

hello author,i meet a new problem

Using backend: pytorch
Traceback (most recent call last):
  File "train.py", line 88, in <module>
    main(config)
  File "train.py", line 17, in main
    train_data_loader = config.initialize('train_data_loader', module_data, "train")
  File "/gpfs/home/chenzhiqiang_stu/taxoE/parse_config.py", line 64, in initialize
    return getattr(module, module_cfg['type'])(*args, **module_cfg['args'])
  File "/gpfs/home/chenzhiqiang_stu/taxoE/data_loader/data_loaders.py", line 91, in __init__
    msk_graph_dataset = MaskedGraphDataset(raw_graph_dataset, mode=mode, sampling_mode=sampling_mode, negative_size=negative_size, expand_factor=expand_factor, cache_refresh_time=cache_refresh_time, normalize_embed=normalize_embed, test_topk=test_topk)
  File "/gpfs/home/chenzhiqiang_stu/taxoE/data_loader/dataset.py", line 229, in __init__
    self.kv.add([str(i) for i in range(len(self.vocab))], self.node_features.numpy())
AttributeError: 'KeyedVectors' object has no attribute 'add'
image

now: i use myself files generate file .bin, have above problem。 i use your three file .term .taxo .embed generate new .bin file, when i train,have the same problem,but i use you provide .computer_science.pickle.20190624, can run.。how could i solve the problem。thanks!