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
Hello, I'm trying to run the optimization query of the Machine Learning/Query Optimization example and I'm getting this error:
Using configuration
- metric: {
"mean_reciprocal_rank": {
"k": 100,
"relevant_rating_threshold": 1
}
}
- selected method: bayesian
- default params: {}
/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/elasticsearch/connection/base.py:209: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.15/security-minimal-setup.html to enable security.
warnings.warn(message, category=ElasticsearchWarning)
Traceback (most recent call last):
File "bin/optimize-query", line 84, in <module>
main()
File "bin/optimize-query", line 71, in main
args.template_id, queries, qrels, logger)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/qopt/optimize.py", line 223, in optimize_query
return optimize(config, objective_fn, initial_points=None, logger_fn=logger_fn)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/qopt/optimize.py", line 265, in optimize
x0=initial_points)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/skopt/optimizer/gp.py", line 268, in gp_minimize
callback=callback, n_jobs=n_jobs, model_queue_size=model_queue_size)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/skopt/optimizer/base.py", line 304, in base_minimize
if eval_callbacks(callbacks, result):
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/skopt/utils.py", line 99, in eval_callbacks
decision = c(result)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/qopt/optimize.py", line 176, in __call__
params=params)
TypeError: logger() got an unexpected keyword argument 'curr_min_score'
real 0m0.988s
user 0m0.927s
sys 0m0.271s
If I replace the "_" with curr_min_score then throws a different error:
- iteration 39/75 (0.0159s) scored 1.0000 with: {"tie_breaker": 0.5699173276454137, "title.english|boost": 4.3273304062411615, "title|boost": 1.6393208127999483, "category|boost": 0.9826987511047194, "category.english|boost": 9.580933015419806, "descriptors|boost": 3.503736851987736, "file_name|boost": 8.566968785271335, "vendor_name|boost": 1.757893690628294, "snippet|boost": 7.494445295285921, "snippet.english|boost": 4.513989505981226, "assetId|boost": 7.035638672539559, "operator": "OR"}
Traceback (most recent call last):
File "bin/optimize-query", line 84, in <module>
main()
File "bin/optimize-query", line 71, in main
args.template_id, queries, qrels, logger)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/qopt/optimize.py", line 223, in optimize_query
return optimize(config, objective_fn, initial_points=None, logger_fn=logger_fn)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/qopt/optimize.py", line 265, in optimize
x0=initial_points)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/skopt/optimizer/gp.py", line 268, in gp_minimize
callback=callback, n_jobs=n_jobs, model_queue_size=model_queue_size)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/skopt/optimizer/base.py", line 302, in base_minimize
result = optimizer.tell(next_x, next_y)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/skopt/optimizer/optimizer.py", line 493, in tell
return self._tell(x, y, fit=fit)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/skopt/optimizer/optimizer.py", line 536, in _tell
est.fit(self.space.transform(self.Xi), self.yi)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/skopt/learning/gaussian_process/gpr.py", line 195, in fit
super(GaussianProcessRegressor, self).fit(X, y)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/sklearn/gaussian_process/_gpr.py", line 234, in fit
self.kernel_.bounds))]
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/sklearn/gaussian_process/_gpr.py", line 503, in _constrained_optimization
bounds=bounds)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/scipy/optimize/_minimize.py", line 618, in minimize
callback=callback, **options)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/scipy/optimize/lbfgsb.py", line 308, in _minimize_lbfgsb
finite_diff_rel_step=finite_diff_rel_step)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 262, in _prepare_scalar_function
finite_diff_rel_step, bounds, epsilon=epsilon)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/scipy/optimize/_differentiable_functions.py", line 76, in __init__
self._update_fun()
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/scipy/optimize/_differentiable_functions.py", line 166, in _update_fun
self._update_fun_impl()
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/scipy/optimize/_differentiable_functions.py", line 73, in update_fun
self.f = fun_wrapped(self.x)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/scipy/optimize/_differentiable_functions.py", line 70, in fun_wrapped
return fun(x, *args)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 74, in __call__
self._compute_if_needed(x, *args)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 68, in _compute_if_needed
fg = self.fun(x, *args)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/sklearn/gaussian_process/_gpr.py", line 225, in obj_func
theta, eval_gradient=True, clone_kernel=False)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/sklearn/gaussian_process/_gpr.py", line 476, in log_marginal_likelihood
alpha = cho_solve((L, True), y_train) # Line 3
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/scipy/linalg/decomp_cholesky.py", line 194, in cho_solve
b1 = asarray_chkfinite(b)
File "/home/gllermaly/examples/Machine Learning/Query Optimization/venv/lib/python3.6/site-packages/numpy/lib/function_base.py", line 486, in asarray_chkfinite
"array must not contain infs or NaNs")
ValueError: array must not contain infs or NaNs
It fails in the iteration number 39 , and num_initial_points is set to 40 as the default , num_iterations set to 70
Any advice would be appreciated.
The text was updated successfully, but these errors were encountered:
llermaly
changed the title
TypeError: logger() got an unexpected keyword argument 'curr_min_score'
Machine Learning/Query Optimization example TypeError: logger() got an unexpected keyword argument 'curr_min_score'
Nov 22, 2021
Hello, I'm trying to run the optimization query of the Machine Learning/Query Optimization example and I'm getting this error:
This is the method that failes
If I replace the "_" with curr_min_score then throws a different error:
It fails in the iteration number 39 , and
num_initial_points
is set to 40 as the default ,num_iterations
set to 70Any advice would be appreciated.
The text was updated successfully, but these errors were encountered: