Skip to content

Commit e5f1248

Browse files
committed
Merge branch 'add_nightly_container_support' of github.com:rgsl888prabhu/cuopt_public into add_nightly_container_support
2 parents 0275741 + 97512f1 commit e5f1248

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+972
-680
lines changed

.github/workflows/build.yaml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -167,20 +167,21 @@ jobs:
167167
date: ${{ inputs.date }}
168168
package-name: cuopt_server
169169
package-type: python
170-
#docs-build:
171-
# if: inputs.build_type == 'nightly' || github.ref_type == 'branch'
172-
# needs: [python-build]
173-
# secrets: inherit
174-
# uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.08
175-
# with:
176-
# build_type: ${{ inputs.build_type || 'branch' }}
177-
# node_type: "gpu-l4-latest-1"
178-
# sha: ${{ inputs.sha }}
179-
# branch: ${{ inputs.branch }}
180-
# date: ${{ inputs.date }}
181-
# arch: amd64
182-
# container_image: rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10
183-
# run_script: ci/build_docs.sh
170+
docs-build:
171+
needs: [python-build]
172+
secrets: inherit
173+
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.08
174+
with:
175+
build_type: ${{ inputs.build_type || 'branch' }}
176+
node_type: "gpu-l4-latest-1"
177+
sha: ${{ inputs.sha }}
178+
branch: ${{ inputs.branch }}
179+
date: ${{ inputs.date }}
180+
arch: "amd64"
181+
file_to_upload: "docs/cuopt/build/html/"
182+
artifact-name: "cuopt_docs"
183+
container_image: "rapidsai/ci-conda:25.08-latest"
184+
script: "ci/build_docs.sh"
184185
wheel-build-cuopt-sh-client:
185186
needs: wheel-build-cuopt
186187
secrets: inherit

benchmarks/linear_programming/cuopt/run_mip.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ int run_single_file(std::string file_path,
205205
settings.heuristics_only = heuristics_only;
206206
settings.num_cpu_threads = num_cpu_threads;
207207
settings.log_to_console = log_to_console;
208+
// settings.tolerances.relative_tolerance = 1e-10;
209+
// settings.tolerances.absolute_tolerance = 1e-6;
208210
cuopt::linear_programming::benchmark_info_t benchmark_info;
209211
settings.benchmark_info_ptr = &benchmark_info;
210212
auto start_run_solver = std::chrono::high_resolution_clock::now();

ci/build_docs.sh

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
23
# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
34
# SPDX-License-Identifier: Apache-2.0
45
#
@@ -19,23 +20,28 @@ set -euo pipefail
1920
rapids-logger "Create test conda environment"
2021
. /opt/conda/etc/profile.d/conda.sh
2122

23+
ENV_YAML_DIR="$(mktemp -d)"
24+
25+
rapids-logger "Downloading artifacts from previous jobs"
26+
CPP_CHANNEL=$(rapids-download-conda-from-github cpp)
27+
PYTHON_CHANNEL=$(rapids-download-conda-from-github python)
28+
29+
rapids-logger "Generating conda environment YAML"
30+
2231
rapids-dependency-file-generator \
2332
--output conda \
2433
--file-key docs \
25-
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml
34+
--prepend-channel "${CPP_CHANNEL}" \
35+
--prepend-channel "${PYTHON_CHANNEL}" \
36+
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee "${ENV_YAML_DIR}/env.yaml"
2637

27-
rapids-mamba-retry env create --yes -f env.yaml -n docs
38+
rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n docs
2839
conda activate docs
2940

3041
rapids-print-env
3142

32-
export RAPIDS_VERSION_NUMBER="24.11"
33-
RAPIDS_DOCS_DIR="$(mktemp -d)"
34-
export RAPIDS_DOCS_DIR
43+
rapids-logger "Build Docs"
44+
./build.sh docs
45+
3546

36-
rapids-logger "Build Python docs"
37-
#mkdir -p "${RAPIDS_DOCS_DIR}/cuopt/"{html,txt}
38-
pushd docs/cuopt
3947

40-
bash build_docs.sh
41-
# rapids-upload-docs

ci/release/update-version-rapids.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ done
5353
# WORKFLOWS
5454
for FILE in .github/workflows/*.yaml; do
5555
sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}"
56+
# CI image tags of the form {rapids_version}-{something}
57+
sed_runner "s/:[0-9]*\\.[0-9]*-/:${NEXT_SHORT_TAG}-/g" "${FILE}"
5658
done
5759

5860
# CI

conda/recipes/cuopt-server/recipe.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ requirements:
3535
- fastapi >=0.104.1
3636
- jsonref =1.1.0
3737
- httpx
38-
- msgpack-python =1.0.8
38+
- msgpack-python =1.1.0
3939
- msgpack-numpy =0.4.8
4040
- numpy >=1.23,<3.0a0
4141
- pandas>=2

conda/recipes/cuopt-sh-client/recipe.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ requirements:
2828
- python =${{ py_version }}
2929
- setuptools>=61.0.0
3030
run:
31-
- msgpack-python =1.0.8
31+
- msgpack-python =1.1.0
3232
- python
3333
- requests
3434

cpp/include/cuopt/linear_programming/solve.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ optimization_problem_solution_t<i_t, f_t> solve_lp(
5151
optimization_problem_t<i_t, f_t>& op_problem,
5252
pdlp_solver_settings_t<i_t, f_t> const& settings = pdlp_solver_settings_t<i_t, f_t>{},
5353
bool problem_checking = true,
54-
bool use_pdlp_solver_mode = true);
54+
bool use_pdlp_solver_mode = true,
55+
bool is_batch_mode = false);
5556

5657
/**
5758
* @brief Linear programming solve function.

cpp/include/cuopt/linear_programming/utilities/cython_solve.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ struct solver_ret_t {
104104

105105
std::unique_ptr<solver_ret_t> call_solve(cuopt::mps_parser::data_model_view_t<int, double>*,
106106
linear_programming::solver_settings_t<int, double>*,
107-
unsigned int flags = cudaStreamNonBlocking);
107+
unsigned int flags = cudaStreamNonBlocking,
108+
bool is_batch_mode = false);
108109

109110
std::pair<std::vector<std::unique_ptr<solver_ret_t>>, double> call_batch_solve(
110111
std::vector<cuopt::mps_parser::data_model_view_t<int, double>*>,

cpp/src/dual_simplex/branch_and_bound.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,12 @@ mip_status_t branch_and_bound_t<i_t, f_t>::solve(mip_solution_t<i_t, f_t>& solut
452452
const i_t num_fractional =
453453
fractional_variables(settings, root_relax_soln.x, var_types, fractional);
454454
const f_t root_objective = compute_objective(original_lp, root_relax_soln.x);
455+
if (settings.solution_callback != nullptr) {
456+
std::vector<f_t> original_x;
457+
uncrush_primal_solution(original_problem, original_lp, root_relax_soln.x, original_x);
458+
settings.set_simplex_solution_callback(original_x,
459+
compute_user_objective(original_lp, root_objective));
460+
}
455461
global_variables::mutex_lower.lock();
456462
f_t lower_bound = global_variables::lower_bound = root_objective;
457463
global_variables::mutex_lower.unlock();

cpp/src/dual_simplex/simplex_solver_settings.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ struct simplex_solver_settings_t {
105105
i_t inside_mip; // 0 if outside MIP, 1 if inside MIP at root node, 2 if inside MIP at leaf node
106106
std::function<void(std::vector<f_t>&, f_t)> solution_callback;
107107
std::function<void()> heuristic_preemption_callback;
108+
std::function<void(std::vector<f_t>&, f_t)> set_simplex_solution_callback;
108109
mutable logger_t log;
109110
std::atomic<i_t>* concurrent_halt; // if nullptr ignored, if !nullptr, 0 if solver should
110111
// continue, 1 if solver should halt

0 commit comments

Comments
 (0)