Skip to content

Allow storing NPS scaling for networks.#5

Open
Menkib64 wants to merge 3 commits intoLeelaChessZero:masterfrom
Menkib64:nps_scaling_for_networks
Open

Allow storing NPS scaling for networks.#5
Menkib64 wants to merge 3 commits intoLeelaChessZero:masterfrom
Menkib64:nps_scaling_for_networks

Conversation

@Menkib64
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings April 25, 2026 18:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for storing and using a per-network NPS scaling value (“NPS Scale”) so workload scaling defaults can be derived from the selected/default network rather than only engine-level configuration.

Changes:

  • Introduces Network.scale_nps in the Django model and wires it into network edit + list views.
  • Exposes scale_nps via the /api/networks/<engine>/ endpoint.
  • Updates workload creation UI/JS to prefill “Expected NPS” from the default network’s scale_nps when available.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Templates/OpenBench/networks.html Displays scale_nps in the networks table and adds sorting by it.
Templates/OpenBench/network.html Adds an editable scale_nps field to the network edit form.
Templates/OpenBench/create_workload.html Triggers network-change handling when selecting dev/base networks.
OpenBench/views.py Includes scale_nps in the API networks response payload.
OpenBench/utils.py Persists scale_nps from the edit form with validation.
OpenBench/static/create_workload.js Auto-populates scale NPS from the default network (and on network changes).
OpenBench/models.py Adds scale_nps field to the Network model.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<th class="cursor" onclick="sort_networks(['author'])">Author</th>
<th class="cursor" onclick="sort_networks(['name'])">Name</th>
<th class="cursor" onclick="sort_networks(['scale_nps'])">NPS Scale</th>
<th class="cursor" onclick="sort_networks(['sha256'])")>Hash</th>
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Hash column header has a malformed onclick attribute (onclick="sort_networks(['sha256'])")), which makes the HTML invalid and can break sorting. Remove the extra ") so the handler is a valid attribute value.

Suggested change
<th class="cursor" onclick="sort_networks(['sha256'])")>Hash</th>
<th class="cursor" onclick="sort_networks(['sha256'])">Hash</th>

Copilot uses AI. Check for mistakes.
Comment on lines +40 to 44
</div>

<div class="row">
<label for="default"> Default </label>
<select id="default" name="default">
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newly added scale_nps row is immediately followed by the Default <select>, but that <select> block is not closed correctly later in the template (it ends with <select> instead of </select>). This can lead to malformed DOM and unreliable form behavior; update the closing tag to </select> (and do the same for the was_default select below).

Copilot uses AI. Check for mistakes.
Comment thread OpenBench/static/create_workload.js Outdated
Comment thread OpenBench/utils.py Outdated
Menkib64 and others added 2 commits April 27, 2026 17:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants