-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Main UltraQuery code
- Loading branch information
Showing
17 changed files
with
2,725 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
output_dir: ~/git/ULTRA/output | ||
|
||
dataset: | ||
class: {{ dataset }} | ||
root: ~/git/ULTRA/query-datasets/ | ||
version: {{ version }} # specify dataset version here or when running the script | ||
|
||
model: | ||
class: UltraQuery | ||
model: | ||
class: Ultra | ||
relation_model: | ||
class: RelNBFNet | ||
input_dim: 64 | ||
hidden_dims: [64, 64, 64, 64, 64, 64] | ||
message_func: distmult | ||
aggregate_func: sum | ||
short_cut: yes | ||
layer_norm: yes | ||
entity_model: | ||
class: QueryNBFNet | ||
input_dim: 64 | ||
hidden_dims: [64, 64, 64, 64, 64, 64] | ||
message_func: distmult | ||
aggregate_func: sum | ||
short_cut: yes | ||
layer_norm: yes | ||
logic: product | ||
dropout_ratio: 0.5 | ||
threshold: {{ threshold }} | ||
more_dropout: 0.0 | ||
|
||
task: | ||
name: InductiveInference | ||
strict_negative: yes | ||
adversarial_temperature: 0.2 | ||
sample_weight: no | ||
metric: [mrr, hits@1, hits@3, hits@10, auroc, spearmanr] # mape is supported as well | ||
|
||
optimizer: | ||
class: Adam | ||
lr: 5.0e-4 | ||
|
||
train: | ||
gpus: {{ gpus }} | ||
batch_size: {{ bs }} # reduce if doesn't fit on a GPU | ||
num_epoch: {{ epochs }} # total number of optimization steps will be num_epochs * batch_per_epoch | ||
batch_per_epoch: {{ bpe }} # number of batches to be considered as "one epoch" | ||
log_interval: 100 | ||
fast_test: 1000 # UltraQuery is slower in inference, use this option for a random subsample of valid data | ||
|
||
ultra_ckpt: {{ ultra_ckpt }} # Ultra checkpoint pre-trained on simple link prediction | ||
ultraquery_ckpt: {{ qe_ckpt }} # UltraQuery checkpoint trained on complex queries |
Oops, something went wrong.