-
Notifications
You must be signed in to change notification settings - Fork 28
PeTTa Refactoring #362
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
base: ref/PeTTa
Are you sure you want to change the base?
PeTTa Refactoring #362
Conversation
| !(assertEqual (List.sum (Cons 1 (Cons 2 (Cons 3 (Cons 2 (Cons 3 Nil)))))) 11) | ||
| !(assertEqual (List.sum (Cons 1 (Cons 2 (Cons 3 (Cons 4 Nil))))) 10) | ||
| !(assertEqual (List.sum (Cons 3.0 (Cons 4.0 (Cons 5.0 (Cons 5.0 (Cons 5.0 (Cons 5.0 (Cons 4.0 (Cons 5.0 (Cons 4.0 (Cons 4.0 (Cons 4.0 (Cons 5.0 (Cons 5.0 (Cons 4.0 (Cons 5.0 (Cons 5.0 (Cons 5.0 (Cons 4.0 (Cons 5.0 (Cons 5.0 (Cons 5.0 (Cons 5.0 (Cons 5.0 (Cons 4.0 (Cons 5.0 (Cons 4.0 Nil))))))))))))))))))))))))))) 119) | ||
| !(test (List.sum (Cons 1 (Cons 2 (Cons 3 (Cons 2 (Cons 3 Nil)))))) 11) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason why you used test here but assertEqual for the rest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No particular reason. Just found that the two could be used interchagably, at lease for this case.
| @@ -0,0 +1,228 @@ | |||
|
|
|||
| ; !(register-module! ../../../metta-moses) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Why do we have two list-methods-test files?
| @@ -0,0 +1,288 @@ | |||
| ; ! (register-module! ../../../metta-moses) | |||
| !(import! &self ../../../metta-moses/metapopulation/metapopulation) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here. Why do we have two test files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought renamed the file into *test.metta from *testold.metta. Now, manually deleted.
|
|
||
| ;; for number to string conversion | ||
| ! (bind! numStr (py-atom str)) | ||
| !(bind! numStr (py-atom str)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does py-atom work in PeTTa?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it doens't. When there is a file import statement PeTTa won't run if there is syntax error in the imported file. So, I was just fixing that. Not looking into the correctness of the python binidings.
|
@K1rubel I just had few questions and I will merge this PR as soon as I get the answers :) |
Description
Refactored code in
list-methods,exemplar-selection,metapoulation,exemplar-typeand the corresponding test files.I have made a few changes in
general-helpersas well, changes that ensure the changes in the above files work.Motivation and Context
Refactoring
MeTTacode to run the much fasterPeTTainterpreter.How Has This Been Tested?
Types of changes
Checklist: