The pymoo pack catches removed and changed pymoo 0.6 APIs, broken Problem._evaluate shapes, ignored minimize options, unseeded runs, and misconfigured hypervolume or decision weights on files that import pymoo. Rules fire only on calls and subclasses bound to pymoo imports.
| Rules |
Safe fix |
Unsafe fix |
Manual fix |
| 23 |
2 |
17 |
4 |
| Rule |
Severity |
Fix |
What it finds |
| removed-in-pymoo |
error |
unsafe |
pymoo removed this module, name or option between 0.5.0 and 0.6.2, so the code raises. |
| deprecated-in-pymoo |
warning |
safe |
pymoo moved or deprecated these forms, and the old import warns or raises. |
| n-constr-keyword |
info |
safe |
Since pymoo 0.6.0, Problem has no n_constr parameter and reads it as the number of inequality constraints. |
| positional-problem-bounds |
error |
unsafe |
Since pymoo 0.6.0, the fourth positional argument of Problem is the number of equality constraints, so bounds given by position land in the wrong place. |
| ignored-problem-keyword |
error |
unsafe |
pymoo 0.6 stores these pymoo 0.4 keywords of Problem and never reads them, so the problem does not behave as the code expects. |
| setup-positional-termination |
error |
unsafe |
setup takes the termination by keyword since pymoo 0.6.0, and a second positional argument raises or is read as verbose. |
| has-terminated-assignment |
error |
none |
Since pymoo 0.6.0, has_terminated is not read, so setting it does not restart a loaded algorithm that had finished. |
| mutation-prob-per-individual |
warning |
unsafe |
Since pymoo 0.6.0, prob is the share of individuals that mutate, and prob_var is the chance for each variable, so an old prob=1/n mutates far less. |
| indicator-normalize-ignored |
error |
unsafe |
The distance indicators accept normalize and do nothing with it, so the distances stay on the scale of the objectives. |
| Rule |
Severity |
Fix |
What it finds |
| objectives-stacked-by-row |
error |
unsafe |
An array built from a list of objectives has one row per objective, and pymoo reshapes it without transposing, so each solution gets the wrong values. |
| evaluate-returns-value |
error |
unsafe |
pymoo ignores what _evaluate returns and reads the objectives from out, so every objective comes back as inf without an error. |
| constraint-not-declared |
error |
none |
Writing out["G"] or out["H"] without declaring the number of constraints raises on the first evaluation. |
| evaluate-indexing |
error |
unsafe |
The index takes the wrong axis of x for this problem class, so it raises IndexError or reads the wrong values. |
| elementwise-runner |
error |
unsafe |
pymoo calls elementwise_runner as runner(f, X), so a bare starmap or a runner it never uses raises or does nothing. |
| Rule |
Severity |
Fix |
What it finds |
| minimize-ignored-keyword |
error |
unsafe |
minimize stores this keyword on the algorithm and never reads it, so the run stops by the default termination. |
| algorithm-read-after-minimize |
error |
unsafe |
minimize runs a deep copy of the algorithm and leaves the one you passed untouched, so reading results from it gives nothing. |
| reused-algorithm-without-copy |
error |
unsafe |
With copy_algorithm=False, a second minimize on the same algorithm does not set it up again and returns the earlier result. |
| unread-history |
info |
unsafe |
save_history=True keeps a deep copy of the algorithm for every generation, which made a run 2.6 times slower and its result 150 times larger, and this file never reads it. |
| moead-arguments |
error |
unsafe |
These MOEAD arguments raise, because MOEAD sets the population size from the reference directions. |
| Rule |
Severity |
Fix |
What it finds |
| unseeded-run |
info |
unsafe |
minimize without seed starts from a new random state on every run, so two runs return different fronts. |
| numpy-seed-ignored |
warning |
none |
Since pymoo 0.6.1.6, pymoo draws from its own generator, so np.random.seed does not fix a run. |
| Rule |
Severity |
Fix |
What it finds |
| hv-reference-point |
error |
none |
A reference point at the largest value of each objective gives no volume to the solutions that hold those values, so the hypervolume is too low. |
| decision-weights |
warning |
unsafe |
The decision method reads these weights another way than the code means, so the larger weight counts less. |