Skip to content

Commit 856118e

Browse files
authored
remove import pdb (#1897)
Signed-off-by: changwangss <[email protected]>
1 parent f75ff40 commit 856118e

File tree

9 files changed

+0
-19
lines changed

9 files changed

+0
-19
lines changed

examples/onnxrt/nlp/huggingface_model/token_classification/layoutlmv2/quantization/ptq_dynamic/main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ def _process_dataset(self):
216216
self.label = []
217217
self.onnx_inputs = []
218218
for inputs in self.dataset:
219-
# import pdb;
220-
# pdb.set_trace()
221219
onnx_inputs = []
222220
has_labels = all(inputs.get(k) is not None for k in self.label_names)
223221
if has_labels:
@@ -237,8 +235,6 @@ def _process_dataset(self):
237235
}
238236
"""
239237
for key in self.onnx_input_names:
240-
# import pdb;
241-
# pdb.set_trace()
242238
if key in inputs:
243239
# onnx_inputs[key] = np.array([inputs[key]])
244240
onnx_inputs.append(np.array(inputs[key]))

examples/onnxrt/nlp/huggingface_model/token_classification/layoutlmv2/quantization/ptq_static/main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ def _process_dataset(self):
216216
self.label = []
217217
self.onnx_inputs = []
218218
for inputs in self.dataset:
219-
# import pdb;
220-
# pdb.set_trace()
221219
onnx_inputs = []
222220
has_labels = all(inputs.get(k) is not None for k in self.label_names)
223221
if has_labels:
@@ -237,8 +235,6 @@ def _process_dataset(self):
237235
}
238236
"""
239237
for key in self.onnx_input_names:
240-
# import pdb;
241-
# pdb.set_trace()
242238
if key in inputs:
243239
# onnx_inputs[key] = np.array([inputs[key]])
244240
onnx_inputs.append(np.array(inputs[key]))

examples/pytorch/object_detection/ssd_resnet34/quantization/ptq/fx/python/models/utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def _compute_padding(self, input, dim):
5959
return additional_padding, total_padding
6060

6161
def forward(self, input):
62-
#import pdb; pdb.set_trace()
6362
if self.padding == "VALID":
6463
return F.conv2d(
6564
input,
@@ -180,7 +179,6 @@ def decode_boxes(rel_codes, boxes, weights):
180179
dh = dh / wh
181180

182181
pred_ctr_x = dx * widths + ctr_x
183-
#import pdb; pdb.set_trace()
184182
pred_ctr_y = dy * heights + ctr_y
185183
pred_w = torch.exp(dw) * widths
186184
pred_h = torch.exp(dh) * heights
@@ -194,5 +192,4 @@ def decode_boxes(rel_codes, boxes, weights):
194192
],
195193
dim=2,
196194
)
197-
#import pdb; pdb.set_trace()
198195
return pred_boxes

neural_coder/coders/tensorflow/amp.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ def __init__(self, file) -> None:
2222
self.keras_edited_flag = False
2323

2424
def transform(self):
25-
# import pdb
26-
# pdb.set_trace()
2725
lines = self.file.split("\n")
2826
for line in lines:
2927
if self.is_modify(line):

neural_coder/coders/tensorflow/inc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ def __init__(self, file) -> None:
2121
self.result = []
2222

2323
def transform(self):
24-
# import pdb
25-
# pdb.set_trace()
2624
lines = self.file.split("\n")
2725
for line in lines:
2826
if self.is_modify(line):

neural_compressor/strategy/strategy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ def traverse(self):
485485
return self.distributed_traverse()
486486
self._setup_pre_tuning_algo_scheduler()
487487
self._prepare_tuning()
488-
# import pdb;pdb.set_trace()
489488
traverse_start_time = time()
490489
for op_tuning_cfg in self.next_tune_cfg():
491490
tuning_start_time = time()

neural_compressor/torch/algorithms/habana_fp8/fp8_quant.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ def input_observer_forward_pre_hook(self, input):
131131

132132
### Insert input observer into model, only for fp8_e4m3 static quantization ###
133133
observer_cls = observer_mapping[act_observer]
134-
# import pdb;pdb.set_trace()
135134

136135
if isinstance(module, white_list):
137136
observer_obj = observer_cls(dtype=dtype_mapping[qconfig.act_dtype])

test/pruning_with_pt/pruning_2.x/test_auto_excluding_classifier.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def forward(self, x):
2424

2525
class TestPruning(unittest.TestCase):
2626
def test_pruning_basic(self):
27-
# import pdb;pdb.set_trace()
2827
hidden_size = 32
2928
model = NaiveMLP(hidden_size)
3029
# import classifier searching functions

test/pruning_with_pt/pruning_2.x/test_auto_slim.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def test_pruning_basic(self):
5050
# run mha and ffn pruning
5151
compression_manager = prepare_compression(model=model, confs=configs)
5252
compression_manager.callbacks.on_train_begin()
53-
# import pdb;pdb.set_trace()
5453
for epoch in range(3):
5554
model.train()
5655
compression_manager.callbacks.on_epoch_begin(epoch)

0 commit comments

Comments
 (0)