Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to limit number of triples ? #216

Open
chetoui opened this issue Sep 26, 2021 · 1 comment
Open

how to limit number of triples ? #216

chetoui opened this issue Sep 26, 2021 · 1 comment

Comments

@chetoui
Copy link

chetoui commented Sep 26, 2021

Hi,
I'm a beginner with Pykg2vec, I try to limit the number of triples when I use Freebase15k from

{ tot_triple : 592213
      tot_valid_triples : 50000
       tot_test_triples : 59071
      tot_train_triples : 483142}

to something very small to reduce time of training

{ tot_triple : 30000, tot_valid_triples : 1500, tot_test_triples : 1500, tot_train_triples : 27000}

but I can't found I way to do this. i wonder if there a simple example to apply it in Train.py file .

@chetoui
Copy link
Author

chetoui commented Sep 26, 2021

i already add this, but not working :

kg_meta = KGMetaData(tot_triple =10000,
                       tot_train_triples=8000,
                       tot_test_triples=1000,
                       tot_valid_triples=1000)

  args = KGEArgParser().get_args(sys.argv[1:])
  # Preparing data and cache the data for later usage
  knowledge_graph = KnowledgeGraph(dataset=args.dataset_name,
                                   custom_dataset_path=args.dataset_path)
  knowledge_graph.kg_meta = kg_meta    
  knowledge_graph.prepare_data()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant