question: one time initialization
Closed this issue · 1 comments
adamcrussell commented
Suppose I want to read some background knowledge from an external source. Is there a straightforward way to perform any sort of one time initialization in a Popper run to do things like read data from a file?
andrewcropper commented
Hi Adam,
You can use Popper as a libray:
from popper.util import Settings, print_prog_score
from popper.loop import learn_solution
settings = Settings(kbpath='input_dir')
prog, score, stats = learn_solution(settings)
if prog != None:
print_prog_score(prog, score)
You can then dynamically create the BK files (perhaps as a temporary file).
Kind regards,
Andrew