webyrd / mediKanren

Proof-of-concept for reasoning over the SemMedDB knowledge base, using miniKanren + heuristics + indexing.
MIT License
323 stars 53 forks source link

Output not being flushed #25

Open mihai-sysbio opened 4 years ago

mihai-sysbio commented 4 years ago

I'm trying to use mediKanren with the entire SemMedDB. I obtained the source db and created a .csv following the same format as indicated in code/sample_semmed.csv, at about 10GB. Everything seems to run fine but it's not creating any output. It seems that everything is kept in RAM until the end - which means the machine ran out of RAM and swap well before that. There doesn't seem to be anything wrong with printing to file on my system (macOS + Racket v7.3), only with flushing at these lines:

https://github.com/webyrd/mediKanren/blob/8b1157bec631cab5e87eaef8e4be594521f2bb0b/code/csv-semmed-ordered-unique-enum.rkt#L42-L43

I noticed the todo in README.md dated Nov 27, 2017: TODO: add SemMedDB files, along with terms of use information for SemMedDB.

What is the recommended solution for this problem?