Skip to content

Should we enhance prefill-filter/decode-filter with configurable labels, or encourage direct use of by-label? #436

@googs1025

Description

@googs1025

What would you like to be added:

When integrating other PD (Prefill/Decode)workloads—such as Aibrix’s StormService— we use different Pod labels like:

role=prefill
role=decode

However, the current prefill-filter and decode-filter plugins hardcode:

Label key: "llm-d.ai/role"
Valid values: ["prefill"] and ["decode", "both"]
This makes it difficult to adopt the scheduler with workloads that use different labeling schemes (e.g., role=decode) without modifying their manifests or forking the code.

We see two possible paths forward and would like the community’s input on which is preferred:

✅ Option 1: Enhance prefill-filter / decode-filter with optional parameters
Allow these plugins to accept configuration like:

- type: decode-filter
  parameters:
    label: "role"
    validValues: ["decode", "both"]

If no parameters are provided, fall back to the current hardcoded defaults (llm-d.ai/role, etc.). Internally, they would delegate to the existing ByLabel filter to avoid duplication.

🔁 Option 2: Encourage direct use of the generic by-label plugin
Instead of extending the specialized filters, guide users to define their own by-label filters:

- name: prefill-role-filter
  type: by-label
  parameters:
    label: "role"
    validValues: ["prefill"]

- name: decode-role-filter
  type: by-label
  parameters:
    label: "role"
    validValues: ["decode", "both"]

Practical note: This requires each by-label instance to have a unique name, and assumes the framework supports multiple instances of the same plugin type. In practice, this works if the plugin system is instance-based—but it does make configs slightly more verbose and less self-explanatory compared to named semantic filters like prefill-filter.

Why is this needed:

Metadata

Metadata

Assignees

Labels

triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions