You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return add_model_seed ?merge((;init_seed=rand(1:Int(1e8))), p) : p
else
@warn("Could not find bayesian cache file at $(folder), calling fallback.")
returnfallback()
end
end
will not trigger.
Ideally we would like to provide the function with number of initial points, which will be sampled randomly before running the optimization and that if condition should reflect it.
I have found this when I misspelled a dataset name, which in turn caused the load_bayes_cache to return empty dictionary and all the array comprehensions after that did not error, leading to python error over an empty tuple.
[ Info: Loaded cached results from /home/francja5/Projects/modules/GenerativeAD.jl/data/experiments_bayes/tabular/sptn/arrhytmia.
ERROR: LoadError: PyError ($(Expr(:escape, :(ccall(#= /home/francja5/.julia/packages/PyCall/zqDXB/src/pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw
))))) <class 'ValueError'>
ValueError('cannot reshape array of size 0 into shape (0,newaxis)')
File "/home/francja5/sklearn-env/lib/python3.8/site-packages/skopt/optimizer/optimizer.py", line 493, in tell
return self._tell(x, y, fit=fit)
File "/home/francja5/sklearn-env/lib/python3.8/site-packages/skopt/optimizer/optimizer.py", line 536, in _tell
est.fit(self.space.transform(self.Xi), self.yi)
File "/home/francja5/sklearn-env/lib/python3.8/site-packages/skopt/space/space.py", line 966, in transform
Xt = np.hstack([np.asarray(c).reshape((len(X), -1)) for c in columns])
File "/home/francja5/sklearn-env/lib/python3.8/site-packages/skopt/space/space.py", line 966, in <listcomp>
Xt = np.hstack([np.asarray(c).reshape((len(X), -1)) for c in columns])
Stacktrace:
[1] pyerr_check at /home/francja5/.julia/packages/PyCall/zqDXB/src/exception.jl:60 [inlined]
[2] pyerr_check at /home/francja5/.julia/packages/PyCall/zqDXB/src/exception.jl:64 [inlined]
[3] _handle_error(::String) at /home/francja5/.julia/packages/PyCall/zqDXB/src/exception.jl:81
[4] macro expansion at /home/francja5/.julia/packages/PyCall/zqDXB/src/exception.jl:95 [inlined]
[5] #110 at /home/francja5/.julia/packages/PyCall/zqDXB/src/pyfncall.jl:43 [inlined]
[6] disable_sigint at ./c.jl:446 [inlined]
[7] __pycall! at /home/francja5/.julia/packages/PyCall/zqDXB/src/pyfncall.jl:42 [inlined]
[8] _pycall!(::PyObject, ::PyObject, ::Tuple{Array{AbstractArray,1},Tuple{}}, ::Int64, ::Ptr{Nothing}) at /home/francja5/.julia/packages/PyCall/zqDXB/src/pyfncall.jl:29
[9] _pycall!(::PyObject, ::PyObject, ::Tuple{Array{AbstractArray,1},Tuple{}}, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/francja5/.julia/packages/PyCal
l/zqDXB/src/pyfncall.jl:11
[10] (::PyObject)(::Array{AbstractArray,1}, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/francja5/.julia/packages/PyCall/z
qDXB/src/pyfncall.jl:86
[11] (::PyObject)(::Array{AbstractArray,1}, ::Vararg{Any,N} where N) at /home/francja5/.julia/packages/PyCall/zqDXB/src/pyfncall.jl:86
[12] tell(::GenerativeAD.BayesianHyperOpt, ::Array{AbstractArray,1}, ::Array{Any,1}) at /home/francja5/Projects/modules/GenerativeAD.jl/src/bayesian_opt.jl:68
[13] bayes_params(::NamedTuple{(:firstdense, :batchsize, :ncomp, :nlayers, :activation, :unitary, :sharing),NTuple{7,PyObject}}, ::String, ::typeof(sample_params); add_model_seed::Bool, kwa
rgs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/francja5/Projects/modules/GenerativeAD.jl/src/bayesian_opt.jl:181
[14] top-level scope at /home/francja5/Projects/modules/GenerativeAD.jl/scripts/experiments_tabular/sptn.jl:99
[15] include(::Function, ::Module, ::String) at ./Base.jl:380
[16] include(::Module, ::String) at ./Base.jl:368
[17] exec_options(::Base.JLOptions) at ./client.jl:296
[18] _start() at ./client.jl:506
in expression starting at /home/francja5/Projects/modules/GenerativeAD.jl/scripts/experiments_tabular/sptn.jl:97
The text was updated successfully, but these errors were encountered:
load_bayes_cache
returns an empty dictionary instead ofnothing
therefore the check inGenerativeAD.jl/src/bayesian_opt.jl
Lines 173 to 197 in dce0119
Ideally we would like to provide the function with number of initial points, which will be sampled randomly before running the optimization and that if condition should reflect it.
I have found this when I misspelled a dataset name, which in turn caused the
load_bayes_cache
to return empty dictionary and all the array comprehensions after that did not error, leading to python error over an empty tuple.The text was updated successfully, but these errors were encountered: