Skip to content

Fix to decouple thin client requirements from cuopt main module#92

Merged
rgsl888prabhu merged 21 commits intoNVIDIA:branch-25.05from
rgsl888prabhu:fix_thin_client_deps_on_cuopt
Jun 12, 2025
Merged

Fix to decouple thin client requirements from cuopt main module#92
rgsl888prabhu merged 21 commits intoNVIDIA:branch-25.05from
rgsl888prabhu:fix_thin_client_deps_on_cuopt

Conversation

@rgsl888prabhu
Copy link
Copy Markdown
Collaborator

@rgsl888prabhu rgsl888prabhu commented Jun 10, 2025

Termination status is being pulled from cuOpt which makes cuopt main library a dependency for cuopt thin client.

This PR converts termination status and problem category to string just for server and also adds a new solution class specific to thin client and detaches need to connect with enums from main cuOpt library.

closes #90

@rgsl888prabhu rgsl888prabhu requested a review from a team as a code owner June 10, 2025 20:57
@rgsl888prabhu rgsl888prabhu requested a review from Iroy30 June 10, 2025 20:57
@rgsl888prabhu rgsl888prabhu self-assigned this Jun 10, 2025
@rgsl888prabhu rgsl888prabhu added bug Something isn't working non-breaking Introduces a non-breaking change labels Jun 10, 2025
@rgsl888prabhu rgsl888prabhu requested review from chris-maes and rg20 June 10, 2025 21:08
Comment thread python/cuopt/cuopt/linear_programming/solution/solution.py Outdated
Copy link
Copy Markdown
Contributor

@chris-maes chris-maes left a comment

Choose a reason for hiding this comment

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

I don't think we should merge separate hard code status codes in the thin client. There should really only be one source of truth for these status values and that should be the C++ code.

Comment thread python/cuopt/cuopt/linear_programming/solution/solution.py Outdated
@rgsl888prabhu rgsl888prabhu requested a review from a team as a code owner June 11, 2025 12:37
@rgsl888prabhu
Copy link
Copy Markdown
Collaborator Author

@jameslamb May I get review on this PR

@rgsl888prabhu rgsl888prabhu requested a review from jameslamb June 11, 2025 15:29
Comment thread python/cuopt/cuopt/linear_programming/solution/solution.py
Copy link
Copy Markdown
Contributor

@chris-maes chris-maes left a comment

Choose a reason for hiding this comment

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

This changes the entire Python API to use strings instead of status codes for termination status. I don't think that is what we want. We should just change the thin client to use strings. No changes need to be made in solution.py, solver_wrapper.pyx, or the tests of the Python API.

@rgsl888prabhu
Copy link
Copy Markdown
Collaborator Author

This changes the entire Python API to use strings instead of status codes for termination status. I don't think that is what we want. We should just change the thin client to use strings. No changes need to be made in solution.py, solver_wrapper.pyx, or the tests of the Python API.

solution.py is packaged with thin client as well, so it would affect thin client if we keep it as it is.

@rgsl888prabhu
Copy link
Copy Markdown
Collaborator Author

@chris-maes @rg20 Created new solution module for thin client and only server converts the termination status to string

@rgsl888prabhu rgsl888prabhu requested review from chris-maes and rg20 June 11, 2025 21:36
Copy link
Copy Markdown
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Approving from a ci-codeowners perspective, will defer to other reviewers on the substance of the code changes.

Copy link
Copy Markdown
Contributor

@chris-maes chris-maes left a comment

Choose a reason for hiding this comment

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

LGTM. One minor question. I see the addition of .name to the ProblemCategaory and the LPTermination status. Why is this needed?

@rgsl888prabhu
Copy link
Copy Markdown
Collaborator Author

rgsl888prabhu commented Jun 12, 2025

It just changes enum value to it's corresponding string

LGTM. One minor question. I see the addition of .name to the ProblemCategaory and the LPTermination status. Why is this needed?

It just changes enum value to it's corresponding string, instead of us manually doing it.

@rgsl888prabhu rgsl888prabhu merged commit cfc22c9 into NVIDIA:branch-25.05 Jun 12, 2025
56 checks passed
jieyibi pushed a commit to yining043/cuopt that referenced this pull request Mar 26, 2026
…IA#92)

<!--

Thank you for contributing to cuOpt :)

Here are some guidelines to help the review process go smoothly.

1. Please write a description in this text box of the changes that are
being
   made.

2. Please ensure that you have written units tests for the changes
made/features
   added.

3. If you are closing an issue please use one of the automatic closing
words as
noted here:
https://help.github.com/articles/closing-issues-using-keywords/

4. If your pull request is not ready for review but you want to make use
of the
continuous integration testing facilities please label it with `[WIP]`.

5. If your pull request is ready to be reviewed without requiring
additional
work on top of it, then remove the `[WIP]` label (if present) and
replace
it with `[REVIEW]`. If assistance is required to complete the
functionality,
for example when the C/C++ code of a feature is complete but Python
bindings
are still required, then add the label `[HELP-REQ]` so that others can
triage
and assist. The additional changes then can be implemented on top of the
same PR. If the assistance is done by members of the rapidsAI team, then
no
additional actions are required by the creator of the original PR for
this,
otherwise the original author of the PR needs to give permission to the
person(s) assisting to commit to their personal fork of the project. If
that
doesn't happen then a new PR based on the code of the original PR can be
opened by the person assisting, which then will be the PR that will be
   merged.

6. Once all work has been done and review has taken place please do not
add
features or make changes out of the scope of those requested by the
reviewer
(doing this just add delays as already reviewed code ends up having to
be
re-reviewed/it is hard to tell what is new etc!). Further, please do not
rebase your branch on main/force push/rewrite history, doing any of
these
   causes the context of any comments made by reviewers to be lost. If
   conflicts occur against main they should be resolved by merging main
   into the branch used for making the pull request.

Many thanks in advance for your cooperation!

-->
Termination status is being pulled from cuOpt which makes cuopt main
library a dependency for cuopt thin client.

This PR converts termination status and problem category to string just
for server and also adds a new solution class specific to thin client
and detaches need to connect with enums from main cuOpt library.

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

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Unable to run cuopt-sh-client without installing cuopt-server-cux library

5 participants