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

DM-14509 option to dump matrix and gradient to file #87

Merged
merged 4 commits into from May 30, 2018

Conversation

parejkoj
Copy link
Collaborator

No description provided.

@parejkoj parejkoj force-pushed the tickets/DM-14509 branch 2 times, most recently from 2a42b88 to 9ed6ca7 Compare May 22, 2018 08:01
Add config for outputting hessian/gradient and test.
Log the total number of model parameters on model construction, to help with
debugging.

Cleanup the parameter calculation in tests and add tests for the above method.
Copy link

@fred3m fred3m left a comment

Choose a reason for hiding this comment

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

Overall things look good, although I question the placement of the code to dump the matrix to a file. While it involves calculating the Hessian an extra time outside of the loop, presumably writing the matrices is only done during debugging so the slightly longer runtime shouldn't be noticeable compared to the time it takes to write out the matrices.

self.config.outlierRejectSigma,
doRankUpdate=doRankUpdate,
dumpMatrixFile=dumpMatrixFile)
dumpMatrixFile = "" # clear it so we don't write the matrix again.
Copy link

Choose a reason for hiding this comment

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

You do this a few times. Couldn't this be avoided if createHessian took a dumpMatrixFile parameter instead, and you call createHessian before this loop?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

createHessian is in an anonymous namespace, and it requires building the triplet list by computing the derivatives first, so there's a fair bit of code that would have to be lifted into python first, which would make the public API more complicated than it needs to be.

Also, the Hessian is re-computed after every outer loop call to minimize (after some amount of outlier rejection).

Copy link

Choose a reason for hiding this comment

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

Ok. I still think that this implementation is less than ideal, but it probably isn't worth complicating the API over.

@parejkoj parejkoj merged commit dcb55a6 into master May 30, 2018
@ktlim ktlim deleted the tickets/DM-14509 branch August 25, 2018 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants