mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-06 11:05:42 +08:00
Silence debug print statements and use cloudlog for warnings.
Commented out a debug print statement in `commonmodel.cc` to reduce noise. Replaced `print` statements with `cloudlog.warning` in `model_smart_input.py` for improved logging consistency and better integration with the logging system.
This commit is contained in:
@@ -12,7 +12,7 @@ DrivingModelFrame::DrivingModelFrame(cl_device_id device_id, cl_context context,
|
||||
region.origin = (buffer_length - 1) * frame_size_bytes;
|
||||
region.size = frame_size_bytes;
|
||||
last_img_cl = CL_CHECK_ERR(clCreateSubBuffer(img_buffer_20hz_cl, CL_MEM_READ_WRITE, CL_BUFFER_CREATE_TYPE_REGION, ®ion, &err));
|
||||
printf("Buffer length: %d, region origin: %lu, region size: %lu\n", buffer_length, region.origin, region.size);
|
||||
// printf("Buffer length: %d, region origin: %lu, region size: %lu\n", buffer_length, region.origin, region.size);
|
||||
|
||||
loadyuv_init(&loadyuv, context, device_id, MODEL_WIDTH, MODEL_HEIGHT);
|
||||
init_transform(device_id, context, MODEL_WIDTH, MODEL_HEIGHT);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import pickle
|
||||
from abc import abstractmethod, ABC
|
||||
from openpilot.common.swaglog import cloudlog
|
||||
|
||||
import numpy as np
|
||||
|
||||
@@ -58,7 +59,7 @@ class ModelSmartInput(ABC):
|
||||
def input_shapes(self, value):
|
||||
if not self._input_shapes:
|
||||
self._input_shapes = value
|
||||
print("Waring: ignoring input_shapes setter because ModelSmartInput is in use.")
|
||||
cloudlog.warning("Ignoring input_shapes setter because ModelSmartInput is in use.")
|
||||
|
||||
@property
|
||||
def output_slices(self):
|
||||
@@ -68,7 +69,7 @@ class ModelSmartInput(ABC):
|
||||
def output_slices(self, value):
|
||||
if not self._output_slices:
|
||||
self._output_slices = value
|
||||
print("Waring: ignoring output_slices setter because ModelSmartInput is in use.")
|
||||
cloudlog.warning("Ignoring output_slices setter because ModelSmartInput is in use.")
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
@@ -83,4 +84,4 @@ class ModelSmartInput(ABC):
|
||||
def numpy_inputs(self, value):
|
||||
if not self._numpy_inputs:
|
||||
self._numpy_inputs = value
|
||||
print("Waring: ignoring numpy_inputs setter because ModelSmartInput is in use.")
|
||||
cloudlog.warning("Ignoring numpy_inputs setter because ModelSmartInput is in use.")
|
||||
|
||||
Reference in New Issue
Block a user