Open abianco88 opened 4 years ago
Thus should have been fixed by https://github.com/malmaud/TensorFlow.jl/pull/493
Ah, you are using v0.11.0
And it isn't fixed until v0.12.
Ah for some reason v0.12 hasn't been registered. https://github.com/JuliaRegistries/General/blob/master/T/TensorFlow/Versions.toml
For now do ]add TensorFlow#master
Thank you so much for your response, Lyndon. I'll try later and let you know the result.
I should've mentioned that I was recently able to run the logistic example (but none of the others except mnist_load.jl) by installing TensorFlow#eager_mode, which seems to install v0.12.0. Is there any difference between TensorFlow#eager_mode and TensorFlow#master?
On Sat, Jan 18, 2020, 12:48 PM Lyndon White notifications@github.com wrote:
Ah, you are using v0.11.0 And it isn't fixed until v0.12.
Ah for some reason v0.12 hasn't been registered.
https://github.com/JuliaRegistries/General/blob/master/T/TensorFlow/Versions.toml
For now do ]add TensorFlow#master
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/malmaud/TensorFlow.jl/issues/515?email_source=notifications&email_token=AMOFOFJ5N6XBBHLCHRKHCQ3Q6NFGZA5CNFSM4KHZZCW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJJ7M6I#issuecomment-575927929, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOFOFI3XBZPEMVQABWPSGDQ6NFGZANCNFSM4KHZZCWQ .
The eager mode branch is a little bit behind master. It uses an older version of LibTensorFlow
I re-built the system with Julia 1.0.5 and installed TensorFlow#master. I noted that both TensorFlow#master and TensorFlow#eager_mode spit out the following when I execute tf_versioninfo()
, so I guess they're both using the same front- and back-end version of TensorFlow, right?
tf_version(kind=:backend) = 1.13.1
tf_version(kind=:python) = 1.13.1
tf_version(kind=:julia) = 0.12.0
Anyway, even with TensorFlow#master, I can run logistic.jl and keras.jl but none of the other scripts in the examples directory. What I don't quite understand is why several other examples (like ae.jl and mnist_*.jl) ask for installing the package MNIST, but when I try installing it, I get the message:
ERROR: The following package names could not be resolved:
* MNIST (not found in project, manifest or registry)
Please specify by known `name=uuid`.
Should I open a different issue ticket for this? Since installing either TensorFlow#master or TensorFlow#eager_mode on Julia 1.0.5 allows to successfully run the example logistic.jl without PyCall errors, I feel like this issue has been resolved, right?
Anyway, even with TensorFlow#master, I can run logistic.jl and keras.jl but none of the other scripts in the examples directory. What I don't quite understand is why several other examples (like ae.jl and mnist_*.jl) ask for installing the package MNIST, but when I try installing it, I get the message:
yes, open another issue. Core of it is the MNIST package doesn't exist anymore and has been replaced with MLDatasets but the examples and docs need to be updated. You could skip straight to the PR.
Thanks, will do. Excuse my novice ignorance, but what do you mean by PR?
On Sun, Jan 19, 2020, 2:50 PM Lyndon White notifications@github.com wrote:
Anyway, even with TensorFlow#master, I can run logistic.jl and keras.jl but none of the other scripts in the examples directory. What I don't quite understand is why several other examples (like ae.jl and mnist_*.jl) ask for installing the package MNIST, but when I try installing it, I get the message:
yes, open another issue. Core of it is the MNIST package doesn't exist anymore and has been replaced with MLDatasets but the examples and docs need to be updated. You could skip straight to the PR.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/malmaud/TensorFlow.jl/issues/515?email_source=notifications&email_token=AMOFOFINNZ5LSOV3T2KJFGDQ6S4KVA5CNFSM4KHZZCW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJK4DPA#issuecomment-576045500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOFOFING5334DE3UCXVDTLQ6S4KVANCNFSM4KHZZCWQ .
PR = Pull Request.
It's how you can suggest a change to this repository. The literal meaning is to Request we Pull the changes from your branch.
https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests
Just to clarify, how do I see that LibTensorFlow is different between TensorFlow#master and TensorFlow#eager_mode?
Il giorno dom 19 gen 2020 alle ore 17:25 Lyndon White < notifications@github.com> ha scritto:
PR = Pull Request.
It's how you can suggest a change to this repository. The literal meaning is to Request we Pull the changes from your branch.
https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/malmaud/TensorFlow.jl/issues/515?email_source=notifications&email_token=AMOFOFJJ2XO3KWYKKIYYUWLQ6TOOBA5CNFSM4KHZZCW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJK7QBI#issuecomment-576059397, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOFOFLVHRKJF3KA2OCZO2TQ6TOOBANCNFSM4KHZZCWQ .
Just to clarify, how do I see that LibTensorFlow is different between TensorFlow#master and TensorFlow#eager_mode?
tf_version(kind=:backend)
It might be that I misread the commit history and they are the same.
But TensorFlow#eager_mode
is an old branch that has since been merged into master.
Here is the PR: https://github.com/malmaud/TensorFlow.jl/pull/491
The tutorial fails again. Now train.GradientDescentOptimizer(0.0001)
throw UndefVarError: constant not defined
Stacktrace:
[1] #GradientDescentOptimizer#4(::String, ::Type{TensorFlow.train.GradientDescentOptimizer}, ::Float64) at /home/hung/.julia/packages/TensorFlow/JljDB/src/train.jl:67
[2] TensorFlow.train.GradientDescentOptimizer(::Float64) at /home/hung/.julia/packages/TensorFlow/JljDB/src/train.jl:67
[3] top-level scope at REPL[20]:1
Edit: I was using #master since the current version gave me py_gradient
error.
Edit 2: Ok, someone forgot to import constant
, I added constant
to the import list, now another error was thrown:
ERROR: On worker 2:
KeyError: key "VERSION" not found
getproperty at /home/hung/.julia/packages/PyCall/kAhnQ/src/PyCall.jl:301
getproperty at /home/hung/.julia/packages/PyCall/kAhnQ/src/PyCall.jl:306 [inlined]
#7 at /home/hung/.julia/dev/TensorFlow/src/TensorFlow.jl:202
#112 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/process_messages.jl:309
run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/process_messages.jl:79
run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/process_messages.jl:88
#98 at ./task.jl:333
Stacktrace:
[1] #remotecall_wait#150(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(remotecall_wait), ::Function, ::Distributed.Worker) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/remotecall.jl:432
[2] remotecall_wait(::Function, ::Distributed.Worker) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/remotecall.jl:423
[3] #remotecall_wait#153(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(remotecall_wait), ::Function, ::Int64) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/remotecall.jl:444
[4] remotecall_wait(::Function, ::Int64) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/remotecall.jl:444
[5] top-level scope at /home/hung/.julia/dev/TensorFlow/src/TensorFlow.jl:201
[6] eval at ./boot.jl:330 [inlined]
[7] eval at ./Base.jl:70 [inlined]
[8] #tf_version#82(::Symbol, ::typeof(tf_version)) at /home/hung/.julia/dev/TensorFlow/src/version.jl:20
[9] (::TensorFlow.var"#kw##tf_version")(::NamedTuple{(:kind,),Tuple{Symbol}}, ::typeof(tf_version)) at ./none:0
[10] #py_version_check#83(::Bool, ::Bool, ::typeof(TensorFlow.py_version_check)) at /home/hung/.julia/dev/TensorFlow/src/version.jl:47
[11] py_version_check() at /home/hung/.julia/dev/TensorFlow/src/version.jl:47
[12] #load_python_process#1(::Bool, ::typeof(TensorFlow.load_python_process)) at /home/hung/.julia/dev/TensorFlow/src/TensorFlow.jl:179
[13] load_python_process at /home/hung/.julia/dev/TensorFlow/src/TensorFlow.jl:161 [inlined]
[14] macro expansion at /home/hung/.julia/dev/TensorFlow/src/TensorFlow.jl:200 [inlined]
[15] add_gradients_py(::Tensor{Float32}, ::Array{Any,1}, ::Nothing) at /home/hung/.julia/dev/TensorFlow/src/core.jl:1553
[16] gradients at /home/hung/.julia/dev/TensorFlow/src/core.jl:1541 [inlined] (repeats 2 times)
[17] compute_gradients(::TensorFlow.train.GradientDescentOptimizer, ::Tensor{Float32}, ::Nothing) at /home/hung/.julia/dev/TensorFlow/src/train.jl:49
[18] #minimize#1(::Nothing, ::Nothing, ::Nothing, ::typeof(TensorFlow.train.minimize), ::TensorFlow.train.GradientDescentOptimizer, ::Tensor{Float32}) at /home/hung/.julia/dev/TensorFlow/src/train.jl:41
[19] minimize(::TensorFlow.train.GradientDescentOptimizer, ::Tensor{Float32}) at /home/hung/.julia/dev/TensorFlow/src/train.jl:38
This one is from the minimize
. Not GradientDescentOptimizer
. My guess is that VERSION is a ENV
key, so I just assign ENV["VERSION"] = tf_version()
. That error is gone, but then another one appears:
ERROR: On worker 2:
Python error: KeyError("import_meta_graph")
error at ./error.jl:33
#3 at /home/hung/.julia/dev/TensorFlow/src/py.jl:45
py_with at /home/hung/.julia/dev/TensorFlow/src/py.jl:20
make_py_graph at /home/hung/.julia/dev/TensorFlow/src/py.jl:52
py_gradients at /home/hung/.julia/dev/TensorFlow/src/py.jl:73
#9 at /home/hung/.julia/dev/TensorFlow/src/TensorFlow.jl:202
#112 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/process_messages.jl:309
run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/process_messages.jl:79
run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/process_messages.jl:88
#98 at ./task.jl:333
Stacktrace:
[1] #remotecall_wait#150(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(remotecall_wait), ::Function, ::Distributed.Worker) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/remotecall.jl:432
[2] remotecall_wait(::Function, ::Distributed.Worker) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/remotecall.jl:423
[3] #remotecall_wait#153(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(remotecall_wait), ::Function, ::Int64) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/remotecall.jl:444
[4] remotecall_wait(::Function, ::Int64) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Distributed/src/remotecall.jl:444
[5] top-level scope at /home/hung/.julia/dev/TensorFlow/src/TensorFlow.jl:201
[6] eval at ./boot.jl:330 [inlined]
[7] eval at ./Base.jl:70 [inlined]
[8] add_gradients_py(::Tensor{Float32}, ::Array{Any,1}, ::Nothing) at /home/hung/.julia/dev/TensorFlow/src/core.jl:1553
[9] gradients at /home/hung/.julia/dev/TensorFlow/src/core.jl:1541 [inlined] (repeats 2 times)
[10] compute_gradients(::TensorFlow.train.GradientDescentOptimizer, ::Tensor{Float32}, ::Nothing) at /home/hung/.julia/dev/TensorFlow/src/train.jl:49
[11] #minimize#1(::Nothing, ::Nothing, ::Nothing, ::typeof(TensorFlow.train.minimize), ::TensorFlow.train.GradientDescentOptimizer, ::Tensor{Float32}) at /home/hung/.julia/dev/TensorFlow/src/train.jl:41
[12] minimize(::TensorFlow.train.GradientDescentOptimizer, ::Tensor{Float32}) at /home/hung/.julia/dev/TensorFlow/src/train.jl:38
Does it also fail when TensorFlow#master is installed?
What do you mean? I was using master.
Just asking... I was able to make it work simply removing the package and re-installing it as Lyndon suggested.
Nope, didn't work, sorry. Which commit did you use?
After a fresh installation of Julia on CentOS 7.2, I added TensorFlow, ran the "basic usage" test in README.md and passed it. Then, after installing also the Distributions and Printf packages, I tried to run the "logistic regression example" in the same README and, when I executed
minimize_op = train.minimize(optimizer, Loss)
, I got an error claiming PyCall is not found in current path (see snippet below).Scratching my head, I subsequently added PyCall and re-ran the logistic regression example. Again I was thrown an error at
minimize_op = train.minimize(optimizer, Loss)
, however this time the error stated thatpy_gradients
is not defined (see folowing snippet). How can it be? Any idea on how to fix it?I even tried to kill process 2 (
rmprocs(2)
), but kept facing an error at the same place:If you are making a bug report, please copy and paste the output of the following Julia snippet into the issue: