mlprogram icon indicating copy to clipboard operation
mlprogram copied to clipboard

How is the target vector (program rules sequence) in TreeGen created during training?

Open brando90 opened this issue 3 years ago • 1 comments

TreeGen learns by predicting the rules from the target program. Thus, I assume you make the target program into an AST and in that process you get a sequence (that is padded) indicating which rule was used. In particular to do that you need to decide on an ordering for the rules. Did you use DFS, BFS or something else for that? In what part of the code are you doing that? The code seems hard to follow due to the Profilers...perhaps it was only meant for you to use.

Thanks for your time!

brando90 avatar Jun 22 '21 21:06 brando90

I converted the AST to a sequence of rules at https://github.com/HiroakiMikami/mlprogram/blob/master/mlprogram/actions/action_sequence.py#L310 by using DFS.

HiroakiMikami avatar Jun 22 '21 23:06 HiroakiMikami