snap-stanford / ogb

Benchmark datasets, data loaders, and evaluators for graph machine learning
https://ogb.stanford.edu
MIT License
1.89k stars 398 forks source link

run.sh maybe have some bug? #150

Closed biandh closed 3 years ago

biandh commented 3 years ago

hi, I think run.sh (https://github.com/snap-stanford/ogb/blob/master/examples/lsc/wikikg90m/run.sh) has some problem, the follow cmd --no_save_emb represent not save MLP model param, how can load model when use dglke_eval in test data?

dglke_train --model_name TransE_l2 \ --hidden_dim 200 --gamma 10 --lr 0.1 --regularization_coef 1e-9 \ --valid --test -adv --mix_cpu_gpu --num_proc 4 --num_thread 4 \ --gpu 0 1 2 3 \ --async_update --force_sync_interval 10000 --no_save_emb \ --print_on_screen --encoder_model_name roberta --save_path $SAVE_PATH

Is this as expected??

image

hyren commented 3 years ago

Hi, feel free to remove --no_save_emb to save the model if you want.

It is not a bug and you do not need to load the model to achieve the test prediction. When you train the model, it will automatically save the valid prediction and test prediction every certain steps. After training, you can directly run save_test_submission.py to save the test prediction file according to the best validation performance, check the details at https://github.com/snap-stanford/ogb/tree/master/examples/lsc/wikikg90m#saving-test-submission.