Skip to content

Commit f5a7584

Browse files
committed
Address PR NVIDIA#915 review: per-item solver settings, comment cleanup, docs terminology
Signed-off-by: anandhkb <aanandh@nvidia.com>
1 parent f0b4b6c commit f5a7584

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

docs/cuopt/source/cuopt-server/examples/lp-examples.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,9 @@ In case the user needs to update solver settings through CLI, the option ``-ss``
402402
export port=5000
403403
cuopt_sh data.json -t LP -i $ip -p $port -ss '{"tolerances": {"optimality": 0.0001}, "time_limit": 5}'
404404
405-
In the case of batch mode, you can send a bunch of ``mps`` files at once, and acquire results. The batch mode works only for ``mps`` in the case of CLI.
405+
For solving multiple ``mps`` files, you can send them together (they will be
406+
solved sequentially). This multi-file mode works only for ``mps`` in the case of
407+
CLI.
406408

407409
.. note::
408410
LP batch mode is deprecated. Multiple problems are now solved sequentially.

docs/cuopt/source/cuopt-server/examples/lp/examples/batch_mode_example.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
2-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
5-
# LP Batch Mode CLI Example
5+
# Sequential LP Solve CLI Example
66
#
77
# This example demonstrates how to solve multiple LP problems using MPS files
88
# with the cuopt_sh CLI tool. Multiple problems are solved sequentially.
@@ -46,11 +46,11 @@ RHS
4646
ENDATA
4747
EOF
4848

49-
echo "=== Solving Multiple MPS Files in Batch Mode ==="
49+
echo "=== Solving Multiple MPS Files (Sequential LP Solve) ==="
5050
# Submit multiple MPS files at once
5151
# -t LP: Problem type
5252
# -ss: Solver settings (JSON format)
5353
cuopt_sh "$mps_file" "$mps_file" "$mps_file" -t LP -i $ip -p $port -ss '{"tolerances": {"optimality": 0.0001}, "time_limit": 5}'
5454

5555
echo ""
56-
echo "Note: Multiple LPs are solved sequentially (batch mode is deprecated)."
56+
echo "Note: Multiple LPs are solved sequentially."

python/cuopt/cuopt/tests/linear_programming/test_lp_solver.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,6 @@ def test_parser_and_batch_solver():
479479
settings.set_optimality_tolerance(1e-4)
480480

481481
# Call BatchSolve (deprecated; use sequential Solve instead)
482-
# DeprecationWarning is emitted when running against a build with the
483-
# deprecation; CI asserts it via pytest.warns
484482
batch_solution, solve_time = solver.BatchSolve(data_model_list, settings)
485483

486484
# Call Solve on each individual data model object

python/cuopt_server/cuopt_server/utils/linear_programming/solver.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,13 @@ def create_solution(sol):
352352
]
353353
sol = []
354354
total_solve_time = 0.0
355-
cswarnings, solver_settings = create_solver(
356-
LP_data[0], warmstart_data
357-
)
358-
warnings.extend(cswarnings)
359355
for i_data in LP_data:
360356
i_warnings, data_model = create_data_model(i_data)
361357
warnings.extend(i_warnings)
358+
cswarnings, solver_settings = create_solver(
359+
i_data, warmstart_data
360+
)
361+
warnings.extend(cswarnings)
362362
i_sol = linear_programming.Solve(
363363
data_model, solver_settings=solver_settings
364364
)

0 commit comments

Comments
 (0)