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

caffe --version should print the version/git hash #2969

Closed
berleon opened this issue Aug 24, 2015 · 2 comments
Closed

caffe --version should print the version/git hash #2969

berleon opened this issue Aug 24, 2015 · 2 comments

Comments

@berleon
Copy link
Contributor

berleon commented Aug 24, 2015

caffe does not print its version.
Current behaviour:

$ caffe --version
caffe

The expected behaviour would be to print the git hash.

$ caffe --version
caffe version rc2-470-g6a5425f

This issue can be resolved by setting gflags::SetVersionString.
The git hash can be obtained by git describe --tags. See this stackoverflow question for greater
detail: http://stackoverflow.com/questions/1435953/how-can-i-pass-git-sha1-to-compiler-as-definition-using-cmake

@lukeyeager
Copy link
Contributor

👍

FYI, the CMake build already grabs this information, so it should be relatively easy to add:

https://github.com/BVLC/caffe/blob/0dfc5dac3d/cmake/Summary.cmake#L58-L76

@longjon longjon changed the title caffe --version does not print the version caffe --version should print the version/git hash Nov 5, 2015
@shelhamer
Copy link
Member

Mostly done in #3311 although the full git describe output is not yet included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants