Skip to content

Commit

Permalink
remove import pdb (#1897)
Browse files Browse the repository at this point in the history
Signed-off-by: changwangss <chang1.wang@intel.com>
  • Loading branch information
changwangss authored Jul 3, 2024
1 parent f75ff40 commit 856118e
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ def _process_dataset(self):
self.label = []
self.onnx_inputs = []
for inputs in self.dataset:
# import pdb;
# pdb.set_trace()
onnx_inputs = []
has_labels = all(inputs.get(k) is not None for k in self.label_names)
if has_labels:
Expand All @@ -237,8 +235,6 @@ def _process_dataset(self):
}
"""
for key in self.onnx_input_names:
# import pdb;
# pdb.set_trace()
if key in inputs:
# onnx_inputs[key] = np.array([inputs[key]])
onnx_inputs.append(np.array(inputs[key]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ def _process_dataset(self):
self.label = []
self.onnx_inputs = []
for inputs in self.dataset:
# import pdb;
# pdb.set_trace()
onnx_inputs = []
has_labels = all(inputs.get(k) is not None for k in self.label_names)
if has_labels:
Expand All @@ -237,8 +235,6 @@ def _process_dataset(self):
}
"""
for key in self.onnx_input_names:
# import pdb;
# pdb.set_trace()
if key in inputs:
# onnx_inputs[key] = np.array([inputs[key]])
onnx_inputs.append(np.array(inputs[key]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def _compute_padding(self, input, dim):
return additional_padding, total_padding

def forward(self, input):
#import pdb; pdb.set_trace()
if self.padding == "VALID":
return F.conv2d(
input,
Expand Down Expand Up @@ -180,7 +179,6 @@ def decode_boxes(rel_codes, boxes, weights):
dh = dh / wh

pred_ctr_x = dx * widths + ctr_x
#import pdb; pdb.set_trace()
pred_ctr_y = dy * heights + ctr_y
pred_w = torch.exp(dw) * widths
pred_h = torch.exp(dh) * heights
Expand All @@ -194,5 +192,4 @@ def decode_boxes(rel_codes, boxes, weights):
],
dim=2,
)
#import pdb; pdb.set_trace()
return pred_boxes
2 changes: 0 additions & 2 deletions neural_coder/coders/tensorflow/amp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ def __init__(self, file) -> None:
self.keras_edited_flag = False

def transform(self):
# import pdb
# pdb.set_trace()
lines = self.file.split("\n")
for line in lines:
if self.is_modify(line):
Expand Down
2 changes: 0 additions & 2 deletions neural_coder/coders/tensorflow/inc.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ def __init__(self, file) -> None:
self.result = []

def transform(self):
# import pdb
# pdb.set_trace()
lines = self.file.split("\n")
for line in lines:
if self.is_modify(line):
Expand Down
1 change: 0 additions & 1 deletion neural_compressor/strategy/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ def traverse(self):
return self.distributed_traverse()
self._setup_pre_tuning_algo_scheduler()
self._prepare_tuning()
# import pdb;pdb.set_trace()
traverse_start_time = time()
for op_tuning_cfg in self.next_tune_cfg():
tuning_start_time = time()
Expand Down
1 change: 0 additions & 1 deletion neural_compressor/torch/algorithms/habana_fp8/fp8_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def input_observer_forward_pre_hook(self, input):

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

if isinstance(module, white_list):
observer_obj = observer_cls(dtype=dtype_mapping[qconfig.act_dtype])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def forward(self, x):

class TestPruning(unittest.TestCase):
def test_pruning_basic(self):
# import pdb;pdb.set_trace()
hidden_size = 32
model = NaiveMLP(hidden_size)
# import classifier searching functions
Expand Down
1 change: 0 additions & 1 deletion test/pruning_with_pt/pruning_2.x/test_auto_slim.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def test_pruning_basic(self):
# run mha and ffn pruning
compression_manager = prepare_compression(model=model, confs=configs)
compression_manager.callbacks.on_train_begin()
# import pdb;pdb.set_trace()
for epoch in range(3):
model.train()
compression_manager.callbacks.on_epoch_begin(epoch)
Expand Down

0 comments on commit 856118e

Please sign in to comment.