Skip to content

feat(split-finder): support splitting a subnet across multiple load types - #12089

Open
pierugo-dfinity wants to merge 6 commits into
masterfrom
pierugo/split-finder/multiple-loads
Open

pierugo-dfinity wants to merge 6 commits into
masterfrom
pierugo/split-finder/multiple-loads

Conversation

@pierugo-dfinity

@pierugo-dfinity pierugo-dfinity commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Extend split-finder to split a subnet according to multiple load metrics, attempting to satisfy each of them. For example, splitting a subnet w.r.t instructions executed AND canisters installed (with --load-type instructions_executed canisters_installed). (Note: canisters_installed is only supported after #12038)

Each load can give a different epsilon to prioritize one over another.

The solver was actually already solving for multiple load types within solve_partition. This PR extends the CLI arguments to pass a list of all requested loads instead of a singleton.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the multi-metric subnet balancing changes.

No open issues 🎉

What changed in this PR

Extends the subnet split finder to balance multiple load types within a single partition while minimizing communication between the resulting subnets.

Changes:

  • Adds multi-type --load-type arguments with optional per-type deviations, retaining --epsilon-load as the fallback.
  • Loads aligned metric vectors and applies their balance constraints together.
  • Adds tests for multi-metric balancing, per-type deviations, and argument validation.
File Description
rs/​recovery/​subnet_splitting/​split_finder/​split_finder.py Adds multi-type CLI parsing, shared balancing constraints, and clearer solver failure messages.
rs/​recovery/​subnet_splitting/​split_finder/​split_finder_test.py Tests multi-metric loading, balancing, deviation limits, and CLI validation.
rs/​recovery/​subnet_splitting/​split_finder/​data_io.py Returns a load vector for each requested metric.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The PR description advertises canisters_installed as a load type, but the CLI rejects it and the exported CSV lacks the column, so the metric must be implemented or the example corrected.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Low severity Example load type is unsupported and absent from exported CSV

rs/​recovery/​subnet_splitting/​split_finder/​split_finder.py:113

The PR description's example --load-type instructions_executed canisters_installed is rejected here because canisters_installed is absent from LOAD_TYPES. The exported CSV also has no such column, so merely adding it to the choices would fail in the loader. Please either support it by deriving a vector of ones for current canister rows (as post_split_estimations.rs derives the installed count), without baseline subtraction, or update the description to use a supported metric.

Review effort: Balanced

@pierugo-dfinity
pierugo-dfinity marked this pull request as ready for review November 13, 2026 15:18
@pierugo-dfinity
pierugo-dfinity requested a review from a team as a code owner November 13, 2026 15:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants