We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7d18b9 commit fa89a62Copy full SHA for fa89a62
1 file changed
multioptpy/Utils/rcmc.py
@@ -469,9 +469,14 @@ def _edge_ts_e(edge):
469
len(self._tasks),
470
)
471
if logger.isEnabledFor(logging.DEBUG):
472
+ # self._tasks is dict[int, ExplorationTask] — must convert to list
473
+ # before slicing; dict[:N] raises TypeError.
474
+ remaining = sorted(
475
+ self._tasks.values(), key=lambda t: t.priority, reverse=True
476
+ )
477
pop_lines = [
478
f" EQ{t.node_id}: q={t.priority:.6f}"
- for t in self._tasks[:10]
479
+ for t in remaining[:10]
480
]
481
if len(self._tasks) > 10:
482
pop_lines.append(f" ... ({len(self._tasks) - 10} more)")
0 commit comments