Skip to content

Conversation

@rgsl888prabhu
Copy link
Collaborator

@rgsl888prabhu rgsl888prabhu commented Jan 29, 2026

Description

For #811

Summary by CodeRabbit

Release Notes

  • New Features

    • Added matrix-based quadratic objective support for optimization problems
    • Introduced new API methods for improved consistency; older method names deprecated
  • Documentation

    • Expanded examples section with new quadratic programming and solution inspection demonstrations
    • Updated license headers
  • Dependencies

    • Added SciPy >=1.14.1 as a runtime dependency

✏️ Tip: You can customize this high-level summary in your review settings.

Iroy30 and others added 2 commits January 29, 2026 01:44
- [x] TODO: add doc and test
- [ ] TODO: Update API names/deprecate old names

## Issue

Authors:
  - Ishika Roy (https://github.com/Iroy30)

Approvers:
  - Rajesh Gandham (https://github.com/rg20)
  - Ramakrishnap (https://github.com/rgsl888prabhu)

URL: NVIDIA#775
@rgsl888prabhu rgsl888prabhu requested review from a team as code owners January 29, 2026 01:49
@rgsl888prabhu rgsl888prabhu self-assigned this Jan 29, 2026
@rgsl888prabhu rgsl888prabhu added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Jan 29, 2026
@rgsl888prabhu rgsl888prabhu merged commit 9e7141d into NVIDIA:main Jan 29, 2026
18 of 20 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR adds scipy>=1.14.1 as a runtime dependency across conda environments, recipes, and pyproject.toml. It implements matrix-based quadratic objective support in cuopt's Problem and QuadraticExpression classes, introduces deprecation wrappers for renamed methods, and adds new example files demonstrating quadratic programming capabilities.

Changes

Cohort / File(s) Summary
Dependency Management
conda/environments/all_cuda-129_arch-aarch64.yaml, conda/environments/all_cuda-129_arch-x86_64.yaml, conda/environments/all_cuda-131_arch-aarch64.yaml, conda/environments/all_cuda-131_arch-x86_64.yaml, conda/recipes/cuopt/recipe.yaml, dependencies.yaml, python/cuopt/pyproject.toml
Added scipy>=1.14.1 as a runtime dependency across conda environment configurations and Python package metadata.
Core Library Changes
python/cuopt/cuopt/linear_programming/problem.py
Implemented matrix-based quadratic objective support: added qmatrix, qvars fields to QuadraticExpression; extended arithmetic operations to propagate matrix terms; replaced legacy qcoo/qcsr with unified objective_qmatrix (CSR); added deprecation wrappers for get_pdlp_warm_start_data→getWarmstartData and getQcsr→getQCSR; introduced ObjValue property; updated initialization and objective handling paths.
Documentation String Updates
python/cuopt/cuopt/linear_programming/solver_settings/solver_settings.py
Updated docstring to reference new getWarmstartData method name and copyright header year.
Example Files
docs/cuopt/source/cuopt-python/lp-qp-milp/examples/qp_matrix_example.py, docs/cuopt/source/cuopt-python/lp-qp-milp/examples/solution_example.py
Added two new example files demonstrating quadratic matrix-based objective construction and solution inspection with dual values and reduced costs.
License/Header Updates
docs/cuopt/source/cuopt-python/lp-qp-milp/examples/expressions_constraints_example.py, docs/cuopt/source/cuopt-python/lp-qp-milp/examples/incumbent_solutions_example.py, docs/cuopt/source/cuopt-python/lp-qp-milp/examples/pdlp_warmstart_example.py, docs/cuopt/source/cuopt-python/lp-qp-milp/examples/production_planning_example.py, docs/cuopt/source/cuopt-python/lp-qp-milp/examples/simple_lp_example.py, docs/cuopt/source/cuopt-python/lp-qp-milp/examples/simple_milp_example.py, docs/cuopt/source/cuopt-python/lp-qp-milp/examples/simple_qp_example.py
Consolidated and updated copyright headers with 2025-2026 date range and affiliate references; minimal functional changes.
API Documentation
docs/cuopt/source/cuopt-python/lp-qp-milp/lp-qp-milp-api.rst, docs/cuopt/source/cuopt-python/lp-qp-milp/lp-qp-milp-examples.rst
Updated exclude-members list in API docs to omit deprecated methods; added documentation sections for quadratic matrix objective and problem solution inspection.
Test Updates
python/cuopt/cuopt/tests/linear_programming/test_python_API.py
Added comprehensive test cases for quadratic matrix construction and arithmetic operations; updated tests to use new getQCSR method and validate matrix-based quadratic term handling.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

non-breaking, improvement

Suggested reviewers

  • kaatish
  • hlinsen
  • chris-maes
  • rg20
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants