-
Notifications
You must be signed in to change notification settings - Fork 0
/
module
executable file
·30 lines (24 loc) · 1.72 KB
/
module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
set -eu
# If this is a test run
if [ "${TEST_RUN:-false}" = true ]
then
# things which ENEXA is supposed to do
mkdir -p $ENEXA_WRITEABLE_DIRECTORY
echo "PREFIX enexa: <http://w3id.org/dice-research/enexa/ontology#> INSERT DATA { <$ENEXA_MODULE_INSTANCE_IRI> <http://w3id.org/dice-research/enexa/module/cel-train/parameter/kg> <http://example.org/kg> . <http://example.org/kg> enexa:location 'enexa-dir://train.owl' }" \
|sparql-update "$ENEXA_META_DATA_ENDPOINT"
echo "PREFIX enexa: <http://w3id.org/dice-research/enexa/ontology#> INSERT DATA { <$ENEXA_MODULE_INSTANCE_IRI> <http://w3id.org/dice-research/enexa/module/cel-train/parameter/kge> <http://example.org/kge> . <http://example.org/kge> enexa:location 'enexa-dir://writeable/entity_embeddings.csv' }" \
|sparql-update "$ENEXA_META_DATA_ENDPOINT"
fi
# Will generate "Log/*/DrillHeuristic_averaging.pth"
echo python drill_train.py \
--path_knowledge_base $(enexa-parameter "http://w3id.org/dice-research/enexa/module/cel-train/parameter/kg") \
--path_knowledge_base_embeddings $(enexa-parameter "http://w3id.org/dice-research/enexa/module/cel-train/parameter/kge") \
--num_episode 0 --min_num_concepts 0 --num_of_randomly_created_problems_per_concept 0 \
--relearn_ratio 0
python drill_train.py \
--path_knowledge_base $(enexa-parameter "http://w3id.org/dice-research/enexa/module/cel-train/parameter/kg") \
--path_knowledge_base_embeddings $(enexa-parameter "http://w3id.org/dice-research/enexa/module/cel-train/parameter/kge") \
--num_episode 0 --min_num_concepts 0 --num_of_randomly_created_problems_per_concept 0 \
--relearn_ratio 0
enexa-add-file Log/*/DrillHeuristic_averaging.pth "http://w3id.org/dice-research/enexa/module/cel-train/result/heuristics"