Jupyter error "tried to read a stream that is not readable" #248
-
|
Hi, model = PySRRegressor(
niterations=40, # < Increase me for better results
binary_operators=["+", "*"],
unary_operators=[
"cos",
"exp",
"sin",
"inv(x) = 1/x",
# ^ Custom operator (julia syntax)
],
extra_sympy_mappings={"inv": lambda x: 1 / x},
# ^ Define operator for SymPy as well
loss="loss(x, y) = (x - y)^2",
# ^ Custom loss function (julia syntax)
)
model.fit(x,y)the following error appeared: RuntimeError: <PyCall.jlwrap (in a Julia function called from Python)
JULIA: tried to read a stream that is not readable
Stacktrace:
[1] watch_stream(stream::Base.PipeEndpoint)
@ SymbolicRegression.SearchUtilsModule ~/.julia/packages/SymbolicRegression/37l4B/src/SearchUtils.jl:79
[2] _EquationSearch(::SymbolicRegression.CoreModule.ProgramConstantsModule.SRThreaded, datasets::Vector{SymbolicRegression.CoreModule.DatasetModule.Dataset{Float32}}; niterations::Int64, options::Options{typeof(loss), Int64, 0.86, 10}, numprocs::Nothing, procs::Nothing, addprocs_function::Nothing, runtests::Bool, saved_state::Nothing)
@ SymbolicRegression ~/.julia/packages/SymbolicRegression/37l4B/src/SymbolicRegression.jl:418
[3] EquationSearch(datasets::Vector{SymbolicRegression.CoreModule.DatasetModule.Dataset{Float32}}; niterations::Int64, options::Options{typeof(loss), Int64, 0.86, 10}, parallelism::String, numprocs::Nothing, procs::Nothing, addprocs_function::Nothing, runtests::Bool, saved_state::Nothing)
@ SymbolicRegression ~/.julia/packages/SymbolicRegression/37l4B/src/SymbolicRegression.jl:383
[4] EquationSearch(X::Matrix{Float32}, y::Matrix{Float32}; niterations::Int64, weights::Nothing, varMap::Vector{String}, options::Options{typeof(loss), Int64, 0.86, 10}, parallelism::String, numprocs::Nothing, procs::Nothing, addprocs_function::Nothing, runtests::Bool, saved_state::Nothing, multithreaded::Nothing)
@ SymbolicRegression ~/.julia/packages/SymbolicRegression/37l4B/src/SymbolicRegression.jl:320
[5] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Any, NTuple{8, Symbol}, NamedTuple{(:weights, :niterations, :varMap, :options, :numprocs, :parallelism, :saved_state, :addprocs_function), Tuple{Nothing, Int64, Vector{String}, Options{typeof(loss), Int64, 0.86, 10}, Nothing, String, Nothing, Nothing}}})
@ Base ./essentials.jl:731
[6] _pyjlwrap_call(f::Function, args_::Ptr{PyCall.PyObject_struct}, kw_::Ptr{PyCall.PyObject_struct})
@ PyCall ~/.julia/packages/PyCall/twYvK/src/callback.jl:32
[7] pyjlwrap_call(self_::Ptr{PyCall.PyObject_struct}, args_::Ptr{PyCall.PyObject_struct}, kw_::Ptr{PyCall.PyObject_struct})
@ PyCall ~/.julia/packages/PyCall/twYvK/src/callback.jl:44>One reason might be that my Julia version is currently 1.8.5 instead of 0.6.0 (which isn't supported anymore, when I tried to downgrade the current version), or it could be another issue. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
|
Any Julia version greater or equal to 1.6 should work fine (I am personally using 1.9.0-beta2). It could be that an older Julia version is being called instead? Are the older versions of Julia deleted from your machine? Also, please provide system details (OS, Python version, whether you are using it in IPython/Jupyter/terminal). |
Beta Was this translation helpful? Give feedback.
Any Julia version greater or equal to 1.6 should work fine (I am personally using 1.9.0-beta2). It could be that an older Julia version is being called instead? Are the older versions of Julia deleted from your machine?
Also, please provide system details (OS, Python version, whether you are using it in IPython/Jupyter/terminal).