Created
June 21, 2018 04:35
-
-
Save oxinabox/587932d4d197ff5fae72fb31fba9dad5 to your computer and use it in GitHub Desktop.
Script to get all the version info related stuff out of TensorFlow.jl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using PyCall | |
| using TensorFlow | |
| macro tryshow(ex) | |
| quote | |
| try | |
| @show $(esc(ex)) | |
| catch err | |
| println("Trying to evaluate ", | |
| $(Meta.quot(ex)), | |
| " but got error: ", | |
| err | |
| ) | |
| end | |
| nothing | |
| end | |
| end | |
| function tf_versioninfo() | |
| println("Please copy-paste all this info into any bug reports.") | |
| println("Note that this may display some errors. But not all errors are bad. Some are expected") | |
| println() | |
| println("----------------") | |
| println("Library Versions") | |
| println("----------------") | |
| @tryshow ENV["TF_USE_GPU"] | |
| @tryshow ENV["LIBTENSORFLOW"] | |
| println() | |
| @tryshow tf_version(kind=:backend) | |
| @tryshow tf_version(kind=:python) | |
| @tryshow tf_version(kind=:julia) | |
| println() | |
| println("-------------") | |
| println("Python Status") | |
| println("-------------") | |
| @tryshow PyCall.conda | |
| @tryshow ENV["PYTHON"] | |
| @tryshow PyCall.PYTHONHOME | |
| @tryshow readstring(`pip --version`) | |
| @tryshow readstring(`pip3 --version`) | |
| println() | |
| println("------------") | |
| println("Julia Status") | |
| println("------------") | |
| versioninfo() | |
| end | |
| tf_versioninfo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment