Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ServiceNow/HypE
/ functions
Functions
60 in github.com/ServiceNow/HypE
⨍
Functions
60
◇
Types & classes
10
↓ 19 callers
Method
num_ent
(self)
dataset.py:57
↓ 12 callers
Method
num_rel
(self)
dataset.py:60
↓ 6 callers
Method
convolve
(self, r_idx, e_idx, pos)
models.py:170
↓ 6 callers
Method
pnr
(self, e_idx, r_idx)
models.py:246
↓ 5 callers
Method
__init__
(self, dataset, emb_dim, **kwargs)
models.py:53
↓ 5 callers
Method
normalize
(self, normalizer)
measure.py:50
↓ 5 callers
Method
shift
(self, v, sh)
models.py:113
↓ 3 callers
Method
forward
(self, r_idx, e1_idx, e2_idx, e3_idx, e4_idx, e5_idx, e6_idx)
models.py:83
↓ 3 callers
Method
init
(self)
models.py:68
↓ 3 callers
Method
save_model
Save the model state to the output folder. If is_best_model is True, then save the model also as best_model.chkpnt
main.py:268
↓ 3 callers
Method
test
Evaluate the given dataset and print results, either by arity or all at once
tester.py:47
↓ 2 callers
Method
eval_dataset
Evaluate the dataset with the given model.
tester.py:110
↓ 2 callers
Method
get_model_from_name
Instantiate a model object given the model name
main.py:69
↓ 2 callers
Method
padd
(self, a, max_length)
main.py:61
↓ 2 callers
Method
read
(self, file_path)
dataset.py:34
↓ 2 callers
Method
read_test
(self, file_path)
dataset.py:45
↓ 2 callers
Method
tuple2ids
(self, tuple_)
dataset.py:63
↓ 1 callers
Method
__str__
(self)
measure.py:24
↓ 1 callers
Method
add_fact_and_shred
(self, fact, queries, raw_or_fil)
tester.py:39
↓ 1 callers
Method
allFactsAsTuples
(self)
tester.py:164
↓ 1 callers
Method
create_output_dir
If an output dir is given, then make sure it exists. Otherwise, create one based on time stamp.
main.py:253
↓ 1 callers
Method
create_queries
(self, fact, position)
tester.py:23
↓ 1 callers
Method
decompose_predictions
(self, targets, predictions, max_length)
main.py:51
↓ 1 callers
Method
generate_neg
(self, pos_batch, neg_ratio)
dataset.py:126
↓ 1 callers
Method
get_ent_id
(self, ent)
dataset.py:72
↓ 1 callers
Method
get_rank
(self, sim_scores)
tester.py:19
↓ 1 callers
Method
get_rel_id
(self, rel)
dataset.py:77
↓ 1 callers
Method
load_last_saved_model
Find the last saved model in the output_dir and load it. Load also the best_model If no model found in the output_dir or if t
main.py:89
↓ 1 callers
Method
load_model
If a pretrained model is provided, then it will be loaded.
main.py:138
↓ 1 callers
Method
neg_each
(self, arr, arity, nr)
dataset.py:132
↓ 1 callers
Method
next_batch
(self, batch_size, neg_ratio, device)
dataset.py:102
↓ 1 callers
Method
next_pos_batch
(self, batch_size)
dataset.py:89
↓ 1 callers
Method
padd_and_decompose
(self, targets, predictions, max_length)
main.py:65
↓ 1 callers
Method
save_hparams
Save the hyperparameters of the model as a json file in the output_dir if train time. If the output_dir contains an hparams.json file
main.py:302
↓ 1 callers
Method
shred_facts
(self, tuples)
tester.py:154
↓ 1 callers
Method
test_and_eval
(self)
main.py:169
↓ 1 callers
Method
train_and_eval
(self)
main.py:179
↓ 1 callers
Method
update
(self, rank, raw_or_fil)
measure.py:39
↓ 1 callers
Method
was_last_batch
(self)
dataset.py:138
Method
__add__
Add two measure objects
measure.py:9
Method
__init__
(self, dataset, model, valid_or_test, model_name)
tester.py:9
Method
__init__
(self)
models.py:16
Method
__init__
(self, dataset, emb_dim, **kwargs)
models.py:24
Method
__init__
(self, dataset, emb_dim, **kwargs)
models.py:97
Method
__init__
(self, d, emb_dim, **kwargs)
models.py:131
Method
__init__
(self, dataset, emb_dim, **kwargs)
models.py:209
Method
__init__
(self, ds_name, max_arity=6)
dataset.py:8
Method
__init__
(self, args)
main.py:19
Method
__init__
(self)
measure.py:2
Method
__repr__
(self)
measure.py:36
Method
forward
(self, r_idx, e1_idx, e2_idx, e3_idx, e4_idx, e5_idx, e6_idx)
models.py:38
Method
forward
(self, r_idx, e1_idx, e2_idx, e3_idx, e4_idx, e5_idx, e6_idx)
models.py:117
Method
forward
(self, r_idx, e1_idx, e2_idx, e3_idx, e4_idx, e5_idx, e6_idx, ms, bs)
models.py:193
Method
forward
(self, r_idx, e1_idx, e2_idx, e3_idx, e4_idx, e5_idx, e6_idx, ms)
models.py:251
Method
init
(self)
models.py:32
Method
init
(self)
models.py:107
Method
init
(self)
models.py:164
Method
init
(self)
models.py:226
Method
num_batch
(self, batch_size)
dataset.py:141
Method
rand_ent_except
(self, ent)
dataset.py:82