migalkin / StarE

EMNLP 2020: Message Passing for Hyper-Relational Knowledge Graphs
MIT License
85 stars 17 forks source link

Make it compatible with python==3.10 and cuda==12.1 #14

Closed tae898 closed 10 months ago

migalkin commented 10 months ago

Looks great, thank you! Before we merge, can you reproduce (some of) the original numbers with this updated version?

tae898 commented 10 months ago

Just finished running CUDA_VISIBLE_DEVICES=0 python run.py DEVICE cuda DATASET wd50k. It took about 3 days.

Object prediction results
count : 46159.0000
mr : 839.3874
mrr : 0.4441
hits_at 1 : 0.3496
hits_at 3 : 0.4933
hits_at 5 : 0.5509
hits_at 10 : 0.6225
---------

Subject prediction results
count : 46159.0000
mr : 1397.7628
mrr : 0.2517
hits_at 1 : 0.1897
hits_at 3 : 0.2703
hits_at 5 : 0.3116
hits_at 10 : 0.3715
---------

Overall prediction results
count : 46159.0000
mr : 1118.5751
mrr : 0.3479
hits_at 1 : 0.2696
hits_at 3 : 0.3818
hits_at 5 : 0.4313
hits_at 10 : 0.4970
Epoch: 400 | Loss: 0.00038 | Vl_c: 0.26964 | Vl_mrr: 0.34786 | Vl_mr: 1118.57507 | Vl_h3: 0.38178 | Vl_h5: 0.43126 | Vl_h10: 0.49701 | time_trn: 7.419 min

Machine specs:

migalkin commented 10 months ago

Thanks! By the way, the current dependencies should allow python 3.9+, shall we decrease the minimum version?

tae898 commented 10 months ago

That's possible, but perhaps now setting the version as 3.10 will make it easier later to bump up the other version requirements?

migalkin commented 10 months ago

3.9 is still quite used by ml folks, and there are no 3.10+ specific features we use in the codebase, so I'd probably go for 3.9+

tae898 commented 10 months ago

Sure, I'll update the PR today.

tae898 commented 10 months ago

Just tested on python3.9, and it seems to be working fine.