When I was using Nevergrad I got this warning
/.venv/lib/python3.14/site-packages/cma/sigma_adaptation.py:518: UserWarning: TPA: apparent inconsistency with mirrored samples, where dmi_div_dx0i, dm/dx0=-0.541671, -1.862443 and dmi_div_dx1i, dm/dx1=2.200967, -0.777496
i=636 expected precision=0.000000 mean[i]=0.112854 (time=Feb 6 19:20:08 2026 class=CMAAdaptSigmaTPA method=check_consistency iteration=515)
'CMAAdaptSigmaTPA', es.countiter); m and _warnings.warn(m)
It is just in recreated code since the original is very big. Here is recreated
from concurrent import futures
import nevergrad as ng
import numpy as np
from tqdm import tqdm
from pysat.formula import CNF
from pysat.solvers import Solver
import time
bdg = 100000
param = ng.p.Array(shape=(1000,), lower = 1, upper = 101)
pbar = tqdm(total = bdg)
def decode_test(encoded):
test = []
for i in range(0, len(encoded), 10):
cl = [ int(x) for x in encoded[i:i+10]]
test.append(
{
"positive": cl[:5],
"negative": cl[5:]
}
)
return test
def solve(test):
cnf_list = []
for cl in test:
clause = []
for pos in cl["positive"]:
clause.append(pos)
for pos in cl["negative"]:
clause.append(-pos)
cnf_list.append(clause)
cnf = CNF(from_clauses=cnf_list)
with Solver(bootstrap_with=cnf) as solver:
ans = solver.solve()
return ans
def decode(encoded):
test = decode_test(encoded)
start_sol_time = time.process_time()
ans = solve(test)
end_sol_time = time.process_time()
pbar.update(1)
return end_sol_time - start_sol_time
optimizer = ng.optimizers.Shiwa(
parametrization = param,
budget = bdg,
num_workers=16
)
with futures.ThreadPoolExecutor(max_workers=optimizer.num_workers) as executor:
optimizer.minimize(decode, executor = executor, batch_mode = False, verbosity = 0)
Also, I originally tried to recreate it to output strange CMA output but didn't manage to. Sometimes (more with big budget) when I use NGOpt or Shiwa they are calling CMA which starts to sometimes (ones in 1-5 iterations) output 3 numbers (there is no userwarning or any text. Just 3 numbers which I don't know what about. Probably just internal values of something).
Can somebody help me what it is, how to solve it or get rid of it.
Thanks in advance
When I was using Nevergrad I got this warning
It is just in recreated code since the original is very big. Here is recreated
Also, I originally tried to recreate it to output strange CMA output but didn't manage to. Sometimes (more with big budget) when I use NGOpt or Shiwa they are calling CMA which starts to sometimes (ones in 1-5 iterations) output 3 numbers (there is no userwarning or any text. Just 3 numbers which I don't know what about. Probably just internal values of something).
Can somebody help me what it is, how to solve it or get rid of it.
Thanks in advance