Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def get_optimized_routes(
Delete the solution when it is returned. Defaults to True.
"""
if filepath and cuopt_problem_json_data.startswith("/"):
log.warn(
log.warning(
"Path of the data file on the server was specified, "
"but an absolute path was given. "
"Best practice is to specify the relative path of a "
Expand Down Expand Up @@ -782,7 +782,7 @@ def read_cuopt_problem_data(cuopt_data_model, filepath):
cuopt_data_model = _mps_parse(cuopt_data_model, solver_config)

elif filepath and cuopt_data_model.startswith("/"):
log.warn(
log.warning(
"Path of the data file on the server was specified, "
"but an absolute path was given. "
"Best practice is to specify the relative path of a "
Expand Down Expand Up @@ -904,7 +904,7 @@ def delete_solution(self, id):
pass

except requests.exceptions.HTTPError as e:
log.warn(f"Deletion of solution {id} failed")
log.warning(f"Deletion of solution {id} failed")
log.debug(str(e))
err, _ = self._handle_request_exception(response)
raise ValueError(err)
Expand Down
4 changes: 2 additions & 2 deletions python/cuopt_server/cuopt_server/cuopt_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def watcher(app_exit, results_queue, job_queue, abort_queue, abort_list):
# extract GPU id number from each line (looks like "GPU 0: ..."
gpu_ids = [s.split(" ")[1][0:-1] for s in gpu_string]

# if for some reson the parse failed (nvidia-smi output changed)
# if for some reason the parse failed (nvidia-smi output changed)
gpu_ids = [s for s in gpu_ids if s.isnumeric()]
except Exception:
gpu_string = None
Expand Down Expand Up @@ -391,7 +391,7 @@ def record_factory(*args, **kwargs):
else:
if gpu_count < 1:
gpu_count = 1
logging.warn("GPU count cannot be less than 1")
logging.warning("GPU count cannot be less than 1")
if gpu_count < len(gpu_ids):
gpu_ids = gpu_ids[0:gpu_count]

Expand Down
16 changes: 8 additions & 8 deletions python/cuopt_server/cuopt_server/utils/job_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def check_client_version(client_vers):
return []
cv = client_vers.split(".")
if len(cv) < 2:
logging.warn("Client version missing or bad format")
logging.warning("Client version missing or bad format")
return [
f"Client version missing or not the current format. "
f"Please upgrade your cuOpt client to '{major}.{minor}', "
Expand All @@ -121,7 +121,7 @@ def check_client_version(client_vers):
cmajor, cminor = cv[:2]
matches = (cmajor, cminor) == (major, minor)
if not matches:
logging.warn(f"Client version {cmajor}.{cminor} does not match")
logging.warning(f"Client version {cmajor}.{cminor} does not match")
return [
f"Client version is '{cmajor}.{cminor}' but server "
f"version is '{major}.{minor}'. Please use a matching client."
Expand Down Expand Up @@ -569,7 +569,7 @@ def add_incumbent(self, sol):
# we know when the list has reached empty again
# we can send the sentinel value
if self.is_done():
logging.warn("Incumbent added after job marked done!")
logging.warning("Incumbent added after job marked done!")
sol["solution"] = sol["solution"].tolist()
self.incumbents.append(sol)

Expand Down Expand Up @@ -636,7 +636,7 @@ def set_data_size_and_type(self, size, rtype):

# might as well make sure these match
if rtype != self.rtype:
logging.warn(
logging.warning(
"in set_data_size_and_type result mime_type "
f"does not match, updating {rtype} {self.rtype}"
)
Expand Down Expand Up @@ -872,7 +872,7 @@ def _load_data(self):
)
logging.debug(
message(
"feature check succeeeded for tier '%s', "
"feature check succeeded for tier '%s', "
% request_filter.get_tier()
)
)
Expand Down Expand Up @@ -1445,7 +1445,7 @@ def _try_extension(self, ext, raw_data):
"Pickle data format is deprecated. "
"Use zlib, msgpack, or plain JSON"
)
logging.warn("pickle data is deprecated")
logging.warning("pickle data is deprecated")
logging.debug("pickle data")
else:
raise ValueError(
Expand Down Expand Up @@ -1763,8 +1763,8 @@ def process(self, abort_list):
res.set_result(exception_handler(e))


# TOOD: ExitJob is meant for the solver, Shutdown and
# CudaUnhealty are meant for the result thread
# TODO: ExitJob is meant for the solver, Shutdown and
# CudaUnhealthy are meant for the result thread
# Probably should be in different class hierarchies.
# The latter two probably ought to be SolveResponses
class ExitJob:
Expand Down