DeepZero icon indicating copy to clipboard operation
DeepZero copied to clipboard

keep_top: 0 silently discards every sample instead of keeping them

Open 416rehman opened this issue 4 months ago • 0 comments

What happens

The top_k stage keeps scored[:keep_top]. With keep_top: 0 that slice is empty, so the stage drops every sample and the rest of the pipeline runs on nothing. The run still reports success.

0 is the natural way to write "no limit", so a pipeline meant to rank work without discarding any of it silently analyses zero samples.

Suggested fix (acceptance criteria)

  • [ ] keep_top: 0 (and any negative value) keeps every sample, still ordered by the metric.
  • [ ] The stage logs how many it kept and how many it dropped in both cases.
  • [ ] Tests cover 0, negative, and a limit larger than the input.

Fixed in the same change that added ranking to the bundled kernel-driver pipeline; filing so the behaviour is recorded.

416rehman avatar Jul 25 '26 07:07 416rehman