use config object

triples_to_hdf5(
  config,
  trvate_triple_paths,
  dynamic_relations = FALSE,
  lhs_col = 0L,
  rhs_col = 2L,
  rel_col = 1L,
  pbgref,
  paref
)

Arguments

config

ConfigSchema instance from `setup_config_schema`

trvate_triple_paths

character(3) paths to train, validation, test triple files

lhs_col

integer(1) position of lhs in triple tsv file

rhs_col

integer(1) position of rhs in triple tsv file

rel_col

integer(1) position of relation in triple tsv file

pbgref

python reference to torchbiggraph module

paref

python reference to pathlib module

dynamic_relation

logical(1)

Examples

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 )