Skip to content

Commit 58afbd3

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 81719c3 commit 58afbd3

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
@@ -478,8 +478,6 @@ def test_parser_and_batch_solver():
478478
settings.set_optimality_tolerance(1e-4)
479479

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

485483
# 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
@@ -348,13 +348,13 @@ def create_solution(sol):
348348
]
349349
sol = []
350350
total_solve_time = 0.0
351-
cswarnings, solver_settings = create_solver(
352-
LP_data[0], warmstart_data
353-
)
354-
warnings.extend(cswarnings)
355351
for i_data in LP_data:
356352
i_warnings, data_model = create_data_model(i_data)
357353
warnings.extend(i_warnings)
354+
cswarnings, solver_settings = create_solver(
355+
i_data, warmstart_data
356+
)
357+
warnings.extend(cswarnings)
358358
i_sol = linear_programming.Solve(
359359
data_model, solver_settings=solver_settings
360360
)

0 commit comments

Comments
 (0)