Skip to content

fix(deps): resolve gpu/benchmarks extras conflict for uv - #917

Merged
FabianHofmann merged 1 commit into
masterfrom
fix/uv-extras-conflict
Sep 2, 2026
Merged

fix(deps): resolve gpu/benchmarks extras conflict for uv#917
FabianHofmann merged 1 commit into
masterfrom
fix/uv-extras-conflict

Conversation

@FabianHofmann

Copy link
Copy Markdown
Collaborator

Since #909, uv lock/uv sync fail for everyone on master. This unblocks the dev environment again.

Note

The following content was generated by AI.

Problem

#909 added cuopt-cu12>=26.8 to the gpu extra. It pulls cudf-cu12, which pins pandas>=3.0.0,<3.0.4a0. The benchmarks extra pins pandas==3.0.5. The two are mutually incompatible, and the dev resolution requires both, so uv resolution is unsatisfiable:

Because cudf-cu12>=26.8.0 depends on pandas>=3.0.0,<3.0.4a0 ...
And because linopy[benchmarks] depends on pandas==3.0.5, we can
conclude that linopy[benchmarks] and linopy[gpu] are incompatible.
And because your project requires linopy[benchmarks] and linopy[gpu], we
can conclude that your project's requirements are unsatisfiable.

Fix

Declare the two extras as conflicting so uv resolves them in separate forks instead of unifying them:

[tool.uv]
conflicts = [[{ extra = "gpu" }, { extra = "benchmarks" }]]

After this, uv lock resolves (263 packages), uv lock --check passes, and uv sync --extra dev works. gpu and benchmarks remain individually installable but not together, which reflects the underlying pandas incompatibility.

Checklist

  • AI-generated content is marked.
  • Unit tests for new features were added (not applicable; dependency metadata).
  • A release note is included (can add if wanted).
  • I consent to the release of this PR's code under the MIT license.

cuopt-cu12 (gpu) pulls cudf-cu12 which pins pandas<3.0.4, clashing with
the benchmarks pandas==3.0.5 pin and making uv resolution unsatisfiable.
Declare the two extras conflicting so uv resolves them in separate forks.
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Build cost — v1 vs legacy

v1 build peak & time relative to legacy, on this commit — not a comparison against master (that is CodSpeed).

peak — v1 / legacy time — v1 / legacy
peak v1/legacy time v1/legacy
Full table (time + peak, mean)
benchmarks/drivers/test_build.py::test_build[basic-n=10]
                  time (s)           peak (KiB) 
 name                 mean   │             mean 
────────────────────────────────────────────────
 (legacy)   0.08044 (1.08)   │      13.33 (1.0) 
 (v1)        0.07447 (1.0)   │   269.30 (20.20) 

benchmarks/drivers/test_build.py::test_build[basic-n=250]
                  time (s)         peak (MiB) 
 name                 mean   │           mean 
──────────────────────────────────────────────
 (legacy)   0.08669 (1.08)   │   11.09 (1.00) 
 (v1)        0.08034 (1.0)   │    11.09 (1.0) 

benchmarks/drivers/test_build.py::test_build[cumsum-severity=0]
                  time (s)        peak (KiB) 
 name                 mean   │          mean 
─────────────────────────────────────────────
 (legacy)   0.03386 (1.07)   │   15.17 (1.0) 
 (v1)         0.0315 (1.0)   │   15.17 (1.0) 

benchmarks/drivers/test_build.py::test_build[cumsum-severity=100]
                 time (s)        peak (MiB) 
 name                mean   │          mean 
────────────────────────────────────────────
 (legacy)   0.0489 (1.01)   │   44.93 (1.0) 
 (v1)       0.04836 (1.0)   │   44.93 (1.0) 

benchmarks/drivers/test_build.py::test_build[cumsum-severity=50]
                  time (s)        peak (MiB) 
 name                 mean   │          mean 
─────────────────────────────────────────────
 (legacy)   0.03783 (1.08)   │   11.51 (1.0) 
 (v1)        0.03519 (1.0)   │   11.51 (1.0) 

benchmarks/drivers/test_build.py::test_build[expression_arithmetic-n=10]
                  time (s)         peak (KiB) 
 name                 mean   │           mean 
──────────────────────────────────────────────
 (legacy)   0.09137 (1.04)   │   24.23 (1.10) 
 (v1)        0.08788 (1.0)   │    22.05 (1.0) 

benchmarks/drivers/test_build.py::test_build[expression_arithmetic-n=250]
                 time (s)         peak (MiB) 
 name                mean   │           mean 
─────────────────────────────────────────────
 (legacy)   0.1041 (1.07)   │   15.64 (1.00) 
 (v1)       0.09726 (1.0)   │    15.64 (1.0) 

benchmarks/drivers/test_build.py::test_build[knapsack-n=10000]
                  time (s)          peak (KiB) 
 name                 mean   │            mean 
───────────────────────────────────────────────
 (legacy)   0.02268 (1.07)   │   752.15 (1.10) 
 (v1)        0.02125 (1.0)   │    685.11 (1.0) 

benchmarks/drivers/test_build.py::test_build[knapsack-n=100]
                  time (s)        peak (KiB) 
 name                 mean   │          mean 
─────────────────────────────────────────────
 (legacy)   0.02214 (1.07)   │   3.09 (1.34) 
 (v1)         0.0207 (1.0)   │    2.30 (1.0) 

benchmarks/drivers/test_build.py::test_build[kvl_cycles-severity=0]
                  time (s)          peak (MiB) 
 name                 mean   │            mean 
───────────────────────────────────────────────
 (legacy)   0.06066 (1.21)   │   126.16 (1.44) 
 (v1)        0.05026 (1.0)   │     87.71 (1.0) 

benchmarks/drivers/test_build.py::test_build[kvl_cycles-severity=100]
                  time (s)          peak (MiB) 
 name                 mean   │            mean 
───────────────────────────────────────────────
 (legacy)   0.05987 (1.23)   │   126.16 (1.44) 
 (v1)        0.04861 (1.0)   │     87.71 (1.0) 

benchmarks/drivers/test_build.py::test_build[kvl_cycles-severity=50]
                  time (s)          peak (MiB) 
 name                 mean   │            mean 
───────────────────────────────────────────────
 (legacy)   0.06001 (1.22)   │   126.16 (1.44) 
 (v1)        0.04914 (1.0)   │     87.71 (1.0) 

benchmarks/drivers/test_build.py::test_build[masked-n=100]
                  time (s)          peak (KiB) 
 name                 mean   │            mean 
───────────────────────────────────────────────
 (legacy)   0.04876 (1.01)   │    714.28 (1.0) 
 (v1)         0.0485 (1.0)   │   785.32 (1.10) 

benchmarks/drivers/test_build.py::test_build[masked-n=10]
                 time (s)        peak (KiB) 
 name                mean   │          mean 
────────────────────────────────────────────
 (legacy)   0.0477 (1.10)   │   4.40 (1.34) 
 (v1)       0.04334 (1.0)   │    3.27 (1.0) 

benchmarks/drivers/test_build.py::test_build[merge_balance-severity=0]
                time (s)          peak (KiB) 
 name               mean   │            mean 
─────────────────────────────────────────────
 (legacy)   0.364 (1.02)   │   702.97 (1.10) 
 (v1)       0.3586 (1.0)   │    639.22 (1.0) 

benchmarks/drivers/test_build.py::test_build[merge_balance-severity=100]
                 time (s)        peak (MiB) 
 name                mean   │          mean 
────────────────────────────────────────────
 (legacy)   0.3793 (1.01)   │   18.34 (1.0) 
 (v1)        0.3756 (1.0)   │   18.34 (1.0) 

benchmarks/drivers/test_build.py::test_build[merge_balance-severity=50]
                 time (s)       peak (MiB) 
 name                mean   │         mean 
───────────────────────────────────────────
 (legacy)   0.3755 (1.02)   │   9.54 (1.0) 
 (v1)        0.3695 (1.0)   │   9.54 (1.0) 

benchmarks/drivers/test_build.py::test_build[milp-n=10]
                 time (s)        peak (KiB) 
 name                mean   │          mean 
────────────────────────────────────────────
 (legacy)   0.0701 (1.09)   │   3.64 (1.14) 
 (v1)       0.06442 (1.0)   │    3.20 (1.0) 

benchmarks/drivers/test_build.py::test_build[milp-n=50]
                  time (s)          peak (KiB) 
 name                 mean   │            mean 
───────────────────────────────────────────────
 (legacy)   0.06998 (1.09)   │   216.15 (1.10) 
 (v1)        0.06409 (1.0)   │    195.76 (1.0) 

benchmarks/drivers/test_build.py::test_build[nodal_balance-severity=0]
                  time (s)         peak (KiB) 
 name                 mean   │           mean 
──────────────────────────────────────────────
 (legacy)   0.03398 (1.07)   │   935.30 (1.0) 
 (v1)        0.03183 (1.0)   │   935.30 (1.0) 

benchmarks/drivers/test_build.py::test_build[nodal_balance-severity=100]
                  time (s)       peak (MiB) 
 name                 mean   │         mean 
────────────────────────────────────────────
 (legacy)   0.03515 (1.08)   │   9.66 (1.0) 
 (v1)        0.03262 (1.0)   │   9.66 (1.0) 

benchmarks/drivers/test_build.py::test_build[nodal_balance-severity=50]
                  time (s)       peak (MiB) 
 name                 mean   │         mean 
────────────────────────────────────────────
 (legacy)   0.03475 (1.04)   │   5.32 (1.0) 
 (v1)        0.03334 (1.0)   │   5.32 (1.0) 

benchmarks/drivers/test_build.py::test_build[piecewise-n=1000]
                 time (s)          peak (KiB) 
 name                mean   │            mean 
──────────────────────────────────────────────
 (legacy)   0.1678 (1.03)   │   891.72 (1.07) 
 (v1)        0.1622 (1.0)   │    836.28 (1.0) 

benchmarks/drivers/test_build.py::test_build[piecewise-n=10]
                 time (s)         peak (KiB) 
 name                mean   │           mean 
─────────────────────────────────────────────
 (legacy)   0.1676 (1.04)   │   11.02 (1.03) 
 (v1)        0.1607 (1.0)   │    10.67 (1.0) 

benchmarks/drivers/test_build.py::test_build[qp-n=1000]
                 time (s)          peak (KiB) 
 name                mean   │            mean 
──────────────────────────────────────────────
 (legacy)   0.0471 (1.06)   │   147.66 (1.06) 
 (v1)       0.04456 (1.0)   │    139.84 (1.0) 

benchmarks/drivers/test_build.py::test_build[qp-n=10]
                  time (s)        peak (KiB) 
 name                 mean   │          mean 
─────────────────────────────────────────────
 (legacy)   0.04644 (1.05)   │   2.57 (1.09) 
 (v1)        0.04443 (1.0)   │    2.35 (1.0) 

benchmarks/drivers/test_build.py::test_build[rolling-severity=0]
                  time (s)          peak (KiB) 
 name                 mean   │            mean 
───────────────────────────────────────────────
 (legacy)   0.03524 (1.09)   │   696.72 (1.14) 
 (v1)         0.0324 (1.0)   │    611.13 (1.0) 

benchmarks/drivers/test_build.py::test_build[rolling-severity=100]
                  time (s)         peak (MiB) 
 name                 mean   │           mean 
──────────────────────────────────────────────
 (legacy)   0.08095 (1.02)   │   137.97 (1.0) 
 (v1)        0.07959 (1.0)   │   137.97 (1.0) 

benchmarks/drivers/test_build.py::test_build[rolling-severity=50]
                  time (s)        peak (MiB) 
 name                 mean   │          mean 
─────────────────────────────────────────────
 (legacy)    0.05502 (1.0)   │   69.22 (1.0) 
 (v1)       0.05647 (1.03)   │   69.22 (1.0) 

benchmarks/drivers/test_build.py::test_build[sos-n=1000]
                  time (s)          peak (KiB) 
 name                 mean   │            mean 
───────────────────────────────────────────────
 (legacy)   0.03993 (1.11)   │   377.39 (1.04) 
 (v1)        0.03606 (1.0)   │    363.14 (1.0) 

benchmarks/drivers/test_build.py::test_build[sos-n=10]
                  time (s)        peak (KiB) 
 name                 mean   │          mean 
─────────────────────────────────────────────
 (legacy)   0.03954 (1.11)   │   3.10 (1.41) 
 (v1)        0.03577 (1.0)   │    2.20 (1.0) 

benchmarks/drivers/test_build.py::test_build[sparse_network-n=10]
                  time (s)         peak (KiB) 
 name                 mean   │           mean 
──────────────────────────────────────────────
 (legacy)   0.04472 (1.06)   │   28.94 (1.61) 
 (v1)        0.04212 (1.0)   │    17.97 (1.0) 

benchmarks/drivers/test_build.py::test_build[sparse_network-n=250]
                  time (s)         peak (MiB) 
 name                 mean   │           mean 
──────────────────────────────────────────────
 (legacy)   0.05562 (1.09)   │   37.95 (1.43) 
 (v1)        0.05122 (1.0)   │    26.51 (1.0) 

benchmarks/drivers/test_build.py::test_build[storage-n=10]
                  time (s)          peak (KiB) 
 name                 mean   │            mean 
───────────────────────────────────────────────
 (legacy)    0.08921 (1.0)   │    397.39 (1.0) 
 (v1)       0.09253 (1.04)   │   414.56 (1.04) 

benchmarks/drivers/test_build.py::test_build[storage-n=250]
                 time (s)        peak (MiB) 
 name                mean   │          mean 
────────────────────────────────────────────
 (legacy)   0.09526 (1.0)   │    9.62 (1.0) 
 (v1)       0.1008 (1.06)   │   9.90 (1.03) 

📊 Interactive plots + CSV: download the semantics-report-v1-vs-legacy artifact from this run.

Report-only · not a gate · refreshed on every push · obsolete once legacy is dropped.

@codspeed-hq

codspeed-hq Bot commented Sep 2, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 6.24%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks
❌ 2 regressed benchmarks
✅ 171 untouched benchmarks
⏩ 175 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory test_to_lp[masked-n=100] 1.5 MB 2.7 MB -45.22%
Memory test_to_lp[rolling-severity=0] 2.1 MB 2.9 MB -28.11%
Memory test_to_lp[knapsack-n=10000] 2.7 MB 1.9 MB +45.48%
Memory test_to_lp[rolling-severity=50] 429.7 MB 318.7 MB +34.85%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/uv-extras-conflict (d107c4f) with master (6b69f96)

Open in CodSpeed

Footnotes

  1. 175 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@FabianHofmann
FabianHofmann merged commit 62ef5ea into master Sep 2, 2026
24 of 25 checks passed
@FabianHofmann
FabianHofmann deleted the fix/uv-extras-conflict branch September 2, 2026 15:23
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.

1 participant