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

Error on worker 2 #13

Closed
georgeblck opened this issue Mar 23, 2017 · 4 comments
Closed

Error on worker 2 #13

georgeblck opened this issue Mar 23, 2017 · 4 comments

Comments

@georgeblck
Copy link

I am trying to run the MNIST example and am getting the following error when trying to train the model.

On worker 2:
The Python TensorFlow package could not be imported. You must install Python TensorFlow before using this package.
 in init at /home/user/.julia/v0.5/TensorFlow/src/py.jl:12
 in #12 at /home/user/.julia/v0.5/TensorFlow/src/TensorFlow.jl:137
 in #649 at ./multi.jl:1428
 in run_work_thunk at ./multi.jl:1001
 in run_work_thunk at ./multi.jl:1010 [inlined]
 in #617 at ./event.jl:68
 in #remotecall_wait#631(::Array{Any,1}, ::Function, ::Function, ::Base.Worker) at multi.jl:1095
 in remotecall_wait(::Function, ::Base.Worker) at multi.jl:1086
 in #remotecall_wait#634(::Array{Any,1}, ::Function, ::Function, ::Int64) at multi.jl:1105
 in remotecall_wait(::Function, ::Int64) at multi.jl:1105
 in eval(::Module, ::Any) at boot.jl:234
 in load_python_process() at TensorFlow.jl:131
 in gradients(::TensorFlow.Tensor, ::Array{Any,1}) at core.jl:1211
 in compute_gradients(::TensorFlow.train.GradientDescentOptimizer, ::TensorFlow.Tensor, ::Void) at train.jl:48
 in #minimize#1(::Void, ::Void, ::String, ::Function, ::TensorFlow.train.GradientDescentOptimizer, ::TensorFlow.Tensor) at train.jl:40
 in #train!#11(::Int64, ::Float64, ::Flux.TF.##13#15, ::TensorFlow.train.GradientDescentOptimizer, ::Function, ::Flux.TF.Model, ::Array{Tuple{Array{Float64,1},Array{Int64,1}},1}, ::Array{Tuple{Array{Float64,1},Array{Int64,1}},1}) at model.jl:78
 in (::Flux.#kw##train!)(::Array{Any,1}, ::Flux.#train!, ::Flux.TF.Model, ::Array{Tuple{Array{Float64,1},Array{Int64,1}},1}, ::Array{Tuple{Array{Float64,1},Array{Int64,1}},1}) at <missing>:0
 in include_string(::String, ::String) at loading.jl:441
 in include_string(::String, ::String, ::Int64) at eval.jl:28
 in include_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N}) at eval.jl:32
 in (::Atom.##53#56{String,Int64,String})() at eval.jl:40
 in withpath(::Atom.##53#56{String,Int64,String}, ::String) at utils.jl:30
 in withpath(::Function, ::String) at eval.jl:46
 in macro expansion at eval.jl:57 [inlined]
 in (::Atom.##52#55{Dict{String,Any}})() at task.jl:60
@MikeInnes
Copy link
Member

This error is coming from TensorFlow.jl, you need to do pip install tensorflow so your local Python can find it. If you get stuck with that you could try asking here.

@georgeblck
Copy link
Author

I would've thought that as well, but the On worker 2- line got me thinking that Flux/TensorFlow was trying to run the code on more than one CPU.
I'll try the pip install tensorflow now!

@MikeInnes
Copy link
Member

It's weird, but TensorFlow.jl actually boots a background Julia process and uses that to communicate with tensorflow in Python, hence the error.

@MikeInnes
Copy link
Member

Hopefully you got this sorted – if not I recommend MXNet which has a pretty robust install process.

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

No branches or pull requests

2 participants