Skip to content
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

Refactor most of the optimizer step functions. #328

Merged
merged 2 commits into from Oct 26, 2020

Conversation

dirkschumacher
Copy link
Contributor

I noticed a bit of duplicated code. The common part is now extracted into a private helper function.

The common part is now extracted into a private helper function.
@dfalbel
Copy link
Member

dfalbel commented Oct 26, 2020

Thanks @dirkschumacher ! This looks great! I'll review this PR more carefully tomorrow, my main concern is if:

129063f#diff-4de20d78bee9258794b8ce93bff5f31cd1e99869faa75d089fe46b8f0ddb39a2R41-R42

would change param only in the function context of if it would also modify the reference inside self and I am not sure the tests would capture that.

@dirkschumacher
Copy link
Contributor Author

Yeah I was thinking something similiar. What is the intented behaviour here? Modification of selfor not?

@dfalbel
Copy link
Member

dfalbel commented Oct 26, 2020

It's expected that self is modified.

Copy link
Member

@dfalbel dfalbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a test to check that the state is correctly modified. So we are good to go! Thanks very much @dirkschumacher !

@dfalbel dfalbel merged commit 75e58d2 into mlverse:master Oct 26, 2020
@dirkschumacher dirkschumacher deleted the optimrefactor branch October 26, 2020 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants