Thanks!
Does anyone know what is the desired semantics of calling StartOptimization with doOnlyInitialization = true? Would it be allowed to invoke the initial cost function evaluation in that case?
Edit: Never mind, I figured it out.
Iām trying to follow the guidelines for creating a PR according to CONTRIBUTING.md
When I try to commit, it is not successful because I get some sort of error due to mergetool.
$ git commit -am "WIP: Modify itkGradientDescentOptimizerv4 so AdvanceOneStep() is called prior to GetValueAndDerivative() rather than after; Update tests in ITKOptimizersv4TestDriver to match the algorithmic change"
This message is displayed because 'merge.tool' is not configured.
See 'git mergetool --tool-help' or 'git help config' for more details.
'git mergetool' will now attempt to use one of the following tools:
opendiff kdiff3 tkdiff xxdiff meld tortoisemerge gvimdiff diffuse diffmerge ecmerge p4merge araxis bc codecompare emerge vimdiff
[attr]our-c-style whitespace=tab-in-indent,no-lf-at-eof hooks.style=KWStyle,clangformat
not allowed: ./.gitattributes:31
[attr]our-c-style whitespace=tab-in-indent,no-lf-at-eof hooks.style=KWStyle,clangformat
not allowed: ./.gitattributes:31
Utilities/KWStyle/ITKOverwrite.txt
[attr]our-c-style whitespace=tab-in-indent,no-lf-at-eof hooks.style=KWStyle,clangformat
not allowed: ./.gitattributes:31
[attr]our-c-style whitespace=tab-in-indent,no-lf-at-eof hooks.style=KWStyle,clangformat
not allowed: ./.gitattributes:31
The
merge tool bc is not available as 'bcompare'
gcs6@icecream:/home/gcs6/build/src/ITK/Modules/Numerics/Optimizersv4/test$ git status
On branch issue-2570
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: ../include/itkGradientDescentOptimizerv4.h
deleted: ../include/itkGradientDescentOptimizerv4.hxx
modified: ../include/itkQuasiNewtonOptimizerv4.hxx
modified: ../include/itkRegularStepGradientDescentOptimizerv4.hxx
modified: itkGradientDescentOptimizerv4Test.cxx
modified: itkGradientDescentOptimizerv4Test2.cxx
modified: itkRegularStepGradientDescentOptimizerv4Test.cxx
Untracked files:
(use "git add <file>..." to include in what will be committed)
../include/itkGradientDescentOptimizerv4.hxx.20986.hxx.log
../include/itkGradientDescentOptimizerv4.hxx.BACKUP.20986.hxx
../include/itkGradientDescentOptimizerv4.hxx.CLANGFORMAT.20986.hxx
../include/itkGradientDescentOptimizerv4.hxx.NEW.20986.hxx
../include/itkGradientDescentOptimizerv4.hxx.STAGED.20986.hxx
no changes added to commit (use "git add" and/or "git commit -a")
So I clean up the junk and I try to set a mergetool, but still have problems.
$ git config --global merge.tool meld
$ git commit -am "WIP: Modify itkGradientDescentOptimizerv4 so AdvanceOneStep() is called prior to GetValueAndDerivative() rather than after; Update tests in ITKOptimizersv4TestDriver to match the algorithmic change"
[attr]our-c-style whitespace=tab-in-indent,no-lf-at-eof hooks.style=KWStyle,clangformat
not allowed: ./.gitattributes:31
[attr]our-c-style whitespace=tab-in-indent,no-lf-at-eof hooks.style=KWStyle,clangformat
not allowed: ./.gitattributes:31
Utilities/KWStyle/ITKOverwrite.txt
[attr]our-c-style whitespace=tab-in-indent,no-lf-at-eof hooks.style=KWStyle,clangformat
not allowed: ./.gitattributes:31
[attr]our-c-style whitespace=tab-in-indent,no-lf-at-eof hooks.style=KWStyle,clangformat
not allowed: ./.gitattributes:31
Usage:
meld Start with an empty window
meld <file|folder> Start a version control comparison
meld <file> <file> [<file>] Start a 2- or 3-way file comparison
meld <folder> <folder> [<folder>] Start a 2- or 3-way folder comparison
Error: Cannot compare a mixture of files and directories
[snip]
What am I doing wrong?
Maybe automatic application of clang-format causes some merge conflicts thus derailing the commit? First apply clang format before committing. If that does not help, try commit -n -am "..."
to skip commit checks.
Thanks Dzenan. I did not know that it is necessary to install clang-format. Now it works as expected.
It looks like the instructions may be missing some steps. There is no mention of forking the repository. But that is what is needed?
$ git review-push --force
Pushing to origin
Username for 'https://github.com': gregsharp
Password for 'https://gregsharp@github.com':
remote: Permission to InsightSoftwareConsortium/ITK.git denied to gregsharp.
fatal: unable to access 'https://github.com/InsightSoftwareConsortium/ITK/': The requested URL returned error: 403
Pull request uploaded. It is WIP because there are 12 failing tests. Those should wait until after review of the main concept.