use config object
triples_to_hdf5(
config,
trvate_triple_paths,
dynamic_relations = FALSE,
lhs_col = 0L,
rhs_col = 2L,
rel_col = 1L,
pbgref,
paref
)
ConfigSchema instance from `setup_config_schema`
character(3) paths to train, validation, test triple files
integer(1) position of lhs in triple tsv file
integer(1) position of rhs in triple tsv file
integer(1) position of relation in triple tsv file
python reference to torchbiggraph module
python reference to pathlib module
logical(1)
tfis = fb15k_folder()
edp = gsub(".txt$", "partitioned", tfis)
pbg = reticulate::import("torchbiggraph")
palib = reticulate::import("pathlib")
ent = make_entity_schema(pbgref=pbg)
entities=reticulate::dict(all=ent)
rs = BiocPBG::make_rel_schema(pbgref=pbg)
cs = setup_config_schema( pbgref = pbg, entities = entities,
relations = list(rs), entity_path = paste0(tempdir(), "/uconf"), edge_paths = edp,
checkpoint_path = paste0(tempdir(), "/uconf/chk"))
tt = triples_to_hdf5( cs, tfis, pbgref = pbg, paref = palib )