Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianKs committed Jul 9, 2020
2 parents 162741c + d918c48 commit 4e06713
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 22 deletions.
64 changes: 54 additions & 10 deletions data/download_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
if [ ! -d "$BASEDIR/toy" ]; then
echo Downloading toy
cd $BASEDIR
curl -O https:https://www.uni-mannheim.de/media/Einrichtungen/dws/pi1/kge_datasets/toy.tar.gz
curl -O http:https://web.informatik.uni-mannheim.de/pi1/kge-datasets/toy.tar.gz
tar xvf toy.tar.gz
else
echo toy already present
Expand All @@ -27,7 +27,7 @@ fi
if [ ! -d "$BASEDIR/fb15k" ]; then
echo Downloading fb15k
cd $BASEDIR
curl -O https:https://www.uni-mannheim.de/media/Einrichtungen/dws/pi1/kge_datasets/fb15k.tar.gz
curl -O http:https://web.informatik.uni-mannheim.de/pi1/kge-datasets/fb15k.tar.gz
tar xvf fb15k.tar.gz
cd fb15k
case "$(uname -s)" in
Expand Down Expand Up @@ -56,7 +56,7 @@ fi
if [ ! -d "$BASEDIR/fb15k-237" ]; then
echo Downloading fb15k-237
cd $BASEDIR
curl -O https:https://www.uni-mannheim.de/media/Einrichtungen/dws/pi1/kge_datasets/fb15k-237.tar.gz
curl -O http:https://web.informatik.uni-mannheim.de/pi1/kge-datasets/fb15k-237.tar.gz
tar xvf fb15k-237.tar.gz
else
echo fb15k-237 already present
Expand All @@ -71,7 +71,7 @@ fi
if [ ! -d "$BASEDIR/wn18" ]; then
echo Downloading wn18
cd $BASEDIR
curl -O https:https://www.uni-mannheim.de/media/Einrichtungen/dws/pi1/kge_datasets/wn18.tar.gz
curl -O http:https://web.informatik.uni-mannheim.de/pi1/kge-datasets/wn18.tar.gz
tar xvf wn18.tar.gz
cd wn18
case "$(uname -s)" in
Expand Down Expand Up @@ -100,7 +100,7 @@ fi
if [ ! -d "$BASEDIR/wnrr" ]; then
echo Downloading wnrr
cd $BASEDIR
curl -O https:https://www.uni-mannheim.de/media/Einrichtungen/dws/pi1/kge_datasets/wnrr.tar.gz
curl -O http:https://web.informatik.uni-mannheim.de/pi1/kge-datasets/wnrr.tar.gz
tar xvf wnrr.tar.gz
else
echo wnrr already present
Expand All @@ -116,7 +116,7 @@ fi
if [ ! -d "$BASEDIR/dbpedia50" ]; then
echo Downloading dbpedia50
cd $BASEDIR
curl -O https:https://www.uni-mannheim.de/media/Einrichtungen/dws/pi1/kge_datasets/dbpedia50.tar.gz
curl -O http:https://web.informatik.uni-mannheim.de/pi1/kge-datasets/dbpedia50.tar.gz
tar xvf dbpedia50.tar.gz
else
echo dbpedia50 already present
Expand All @@ -131,7 +131,7 @@ fi
if [ ! -d "$BASEDIR/dbpedia500" ]; then
echo Downloading dbpedia500
cd $BASEDIR
curl -O https:https://www.uni-mannheim.de/media/Einrichtungen/dws/pi1/kge_datasets/dbpedia500.tar.gz
curl -O http:https://web.informatik.uni-mannheim.de/pi1/kge-datasets/dbpedia500.tar.gz
tar xvf dbpedia500.tar.gz
else
echo dbpedia500 already present
Expand All @@ -146,7 +146,7 @@ fi
if [ ! -d "$BASEDIR/db100k" ]; then
echo Downloading db100k
cd $BASEDIR
curl -O https:https://www.uni-mannheim.de/media/Einrichtungen/dws/pi1/kge_datasets/db100k.tar.gz
curl -O http:https://web.informatik.uni-mannheim.de/pi1/kge-datasets/db100k.tar.gz
tar xvf db100k.tar.gz
cd db100k
case "$(uname -s)" in
Expand Down Expand Up @@ -175,7 +175,7 @@ fi
if [ ! -d "$BASEDIR/yago3-10" ]; then
echo Downloading yago3-10
cd $BASEDIR
curl -O https:https://www.uni-mannheim.de/media/Einrichtungen/dws/pi1/kge_datasets/yago3-10.tar.gz
curl -O http:https://web.informatik.uni-mannheim.de/pi1/kge-datasets/yago3-10.tar.gz
tar xvf yago3-10.tar.gz
else
echo yago3-10 already present
Expand All @@ -190,7 +190,7 @@ fi
if [ ! -d "$BASEDIR/wikidata5m" ]; then
echo Downloading wikidata5m
cd $BASEDIR
curl -O https:https://www.uni-mannheim.de/media/Einrichtungen/dws/pi1/kge_datasets/wikidata5m.tar.gz
curl -O http:https://web.informatik.uni-mannheim.de/pi1/kge-datasets/wikidata5m.tar.gz
tar xvf wikidata5m.tar.gz
else
echo wikidata5m already present
Expand All @@ -201,3 +201,47 @@ else
echo wikidata5m already prepared
fi

# kinship
if [ ! -d "$BASEDIR/kinship" ]; then
echo Downloading kinship
cd $BASEDIR
curl -O https://web.informatik.uni-mannheim.de/pi1/kge-datasets/kinship.tar.gz
tar xvf kinship.tar.gz
else
echo kinship already present
fi
if [ ! -f "$BASEDIR/kinship/dataset.yaml" ]; then
python preprocess.py kinship
else
echo kinship already prepared
fi

# nations
if [ ! -d "$BASEDIR/nations" ]; then
echo Downloading nations
cd $BASEDIR
curl -O https://web.informatik.uni-mannheim.de/pi1/kge-datasets/nations.tar.gz
tar xvf nations.tar.gz
else
echo nations already present
fi
if [ ! -f "$BASEDIR/nations/dataset.yaml" ]; then
python preprocess.py nations
else
echo nations already prepared
fi

# umls
if [ ! -d "$BASEDIR/umls" ]; then
echo Downloading umls
cd $BASEDIR
curl -O https://web.informatik.uni-mannheim.de/pi1/kge-datasets/umls.tar.gz
tar xvf umls.tar.gz
else
echo umls already present
fi
if [ ! -f "$BASEDIR/umls/dataset.yaml" ]; then
python preprocess.py umls
else
echo umls already prepared
fi
51 changes: 39 additions & 12 deletions docs/examples/expanded-config-example.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
KvsAll:
label_smoothing: 0.0
query_types:
_po: true
s_o: false
sp_: true
ax_search:
fixed_parameters: []
num_sobol_trials: -1
num_trials: 10
parameter_constraints: []
parameters: []
sobol_seed: 0
complex:
class_name: ComplEx
entity_embedder:
Expand Down Expand Up @@ -39,13 +43,16 @@ dataset:
valid:
filename: valid.del
type: triples
name: fb15k-237
name: toy
num_entities: -1
num_relations: -1
eval:
batch_size: 100
pickle: true
entity_ranking:
chunk_size: -1
data: valid
filter_splits:
- train
- valid
filter_with_test: true
hits_at_k_s:
- 1
- 3
Expand All @@ -61,9 +68,13 @@ eval:
argument_frequency: false
head_and_tail: false
relation_type: false
tie_handling: rounded_mean_rank
eval:
batch_size: 100
num_workers: 0
pin_memory: false
trace_level: example
split: valid
trace_level: epoch
type: entity_ranking
grid_search:
parameters:
Expand All @@ -80,12 +91,16 @@ lookup_embedder:
initialize: normal_
initialize_args:
+++: +++
normal_:
mean: 0.0
std: 0.1
normalize:
p: -1.0
with_grad: false
regularize: lp
regularize_args:
+++: +++
p: 2
weighted: false
regularize_weight: 8.0e-08
round_dim_to: []
Expand All @@ -95,16 +110,23 @@ manual_search:
run: true
model: complex
negative_sampling:
chunk_size: -1
filtering:
implementation: fast_if_available
o: false
p: false
s: false
implementation: spo
split: ''
frequency:
smoothing: 1
implementation: triple
num_samples:
o: -1
p: 0
s: 3
sampling_type: uniform
shared: false
with_replacement: true
random_seed:
numpy: -1
python: -1
Expand All @@ -115,23 +137,27 @@ search:
on_error: abort
type: ax
train:
abort_on_nan: true
auto_correct: false
batch_size: 100
checkpoint:
every: 5
keep: 3
loss: bce
loss_arg: 1.0
lr_scheduler: ConstantLRScheduler
loss: kl
loss_arg: .nan
lr_scheduler: ReduceLROnPlateau
lr_scheduler_args:
+++: +++
mode: max
patience: 4
max_epochs: 20
num_workers: 0
optimizer: Adagrad
optimizer_args:
+++: +++
lr: 0.2
pin_memory: false
split: train
trace_level: epoch
type: KvsAll
visualize_graph: false
Expand All @@ -144,7 +170,8 @@ valid:
metric_value: 0.0
patience: 5
every: 5
filter_with_test: false
metric: mean_reciprocal_rank_filtered
metric: mean_reciprocal_rank_filtered_with_test
metric_expr: float("nan")
split: valid
trace_level: epoch
verbose: true

0 comments on commit 4e06713

Please sign in to comment.