Closed benhid closed 5 years ago
By manually emptying the observers list, the termination criterion (which is added to the list in the algorithm's constructor) is never triggered.
As for now, resetting the Kernel should do the trick.
Should be fixed in b01de86
Optimization algorithms internally use a default observable implementation from the
Store
:https://github.com/jMetal/jMetalPy/blob/fcb9e6704b432e6bf63c8326e334d91394f8dd57/jmetal/config.py#L22
Every time a new observer (e.g., termination criterion, progress bar) is registered to an algorithm, it is added to a private list of the observable class.
In Jupyter notebooks, the re-run of a cell of the code does not empty the internal list of observables from the default observable of the algorithm, dealing with new observers being added to the list every single time. This is due to Jupyter storing the session in memory.
As for now, it is necessary to manually empty the list on every new execution: