Skip to content

Instantly share code, notes, and snippets.

@oxinabox
Created June 21, 2018 04:35
Show Gist options
  • Save oxinabox/587932d4d197ff5fae72fb31fba9dad5 to your computer and use it in GitHub Desktop.
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
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