While preparing geneticengine to participate in the SRBench 2024 run, I was getting None out of a constructor:
def PredictorWrapper(BaseEstimator):
def __init__(self, ind: tuple[str, str]):
self.ind = ind
def mk_estimator(x):
print(f“x={x}”)
p = PredictorWrapper(x)
print(f“p={p}”)
return p
Outputting:
x=('np.log(np.power(dataset[:,1], 10.0))', 'log((x1 ** 10.0))') p=None
Have you found the bug? It took me probably around 1 hour, mainly because I trusted myself too much (and there many other things going on in the code). If you still haven’t found the bug, check the first 3 characters of the code snippet. A function with only other functions inside returns None.