-
Notifications
You must be signed in to change notification settings - Fork 25
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
update harmony to new implementation #308
Conversation
I’ll check this out tomorrow, it’s too big to start now! |
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.
The harmonize
function has a really nice layout. it’s easy to follow what it does, nice!
However it seems like you’re establishing a bunch of parameters that get reused and never changed after the initialization. You could e.g.
- create it a frozen dataclass with methods so you can use the parameters using
self.<name>
, or - create a
NamedTuple
that you can pass around containing the parameters
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.
- don’t name variables LIKE_CONSTANTS
- don’t name variables with single letter names (except for
a, b
for binary operators,i
forenumerate
and similar conventions)
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.
the variables still have weird names with capital letters in them
Co-authored-by: Philipp A. <[email protected]>
Co-authored-by: Philipp A. <[email protected]>
removed all prints and added a warning if harmony didnt converge |
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.
Please also check the review summary: #308 (review)
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.
the variables still have weird names with capital letters in them
Most of the names are just taken from the reference implementation |
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.
You said you’re going to do a follow-up PR that moves all the various reused parameters (Phi, R, E, O, theta, …) into a container. Otherwise looks good!
Fixes #299