dice-group / dice-embeddings

Hardware-agnostic Framework for Large-scale Knowledge Graph Embeddings
MIT License
50 stars 14 forks source link

AttributeError: 'KG' object has no attribute 'er_vocab' #273

Closed sshivam95 closed 1 week ago

sshivam95 commented 1 week ago

I am training Keci embeddings using 5 fold cross-validation. I am using the following command:

dicee --path_single_kg KGs/Animals/train.txt --storage_path Experiments --model Keci --p 0 --q 1 --num_epochs 100 --embedding_dim 256 --scoring_technique NegSample --batch_size 100_000 --eval_model None --optim Adam --trainer PL --num_folds_for_cv 5

This gives me the following assertion error:

Traceback (most recent call last):
  File "/anaconda3/envs/dice/bin/dicee", line 33, in <module>
    sys.exit(load_entry_point('dicee', 'console_scripts', 'dicee')())
  File "/dice-embeddings/dicee/scripts/run.py", line 139, in main
    Execute(get_default_arguments()).start()
  File "/dice-embeddings/dicee/executer.py", line 231, in start
    self.trained_model, form_of_labelling = self.trainer.start(knowledge_graph=self.knowledge_graph)
  File "/dice-embeddings/dicee/trainer/dice_trainer.py", line 333, in start
    return self.k_fold_cross_validation(knowledge_graph)
  File "/dice-embeddings/dicee/trainer/dice_trainer.py", line 377, in k_fold_cross_validation
    res = self.evaluator.eval_with_data(dataset=dataset, trained_model=model, triple_idx=test_set_for_i_th_fold,
  File "/dice-embeddings/dicee/evaluator.py", line 465, in eval_with_data
    self.vocab_preparation(dataset)
  File "/dice-embeddings/dicee/evaluator.py", line 45, in vocab_preparation
    if isinstance(dataset.er_vocab, dict):
AttributeError: 'KG' object has no attribute 'er_vocab'

I am using the latest version of dice-embeddings. Am I missing something in the arguments?