Skip to content

Commit f309262

Browse files
committed
refactor(//tests): Apply linting
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 076bab0 commit f309262

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/py/test_ptq_trt_calibrator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
import torchvision.transforms as transforms
1111
from model_test_case import ModelTestCase
1212

13+
1314
class TRTEntropyCalibrator(trt.IInt8EntropyCalibrator2):
15+
1416
def __init__(self, dataloader, **kwargs):
1517
trt.IInt8EntropyCalibrator2.__init__(self)
1618

@@ -40,7 +42,6 @@ def get_batch(self, names):
4042
batch = batch[0].to(self.device)
4143
return [batch.data_ptr()]
4244

43-
4445
def read_calibration_cache(self):
4546
# If there is a cache, use it instead of calibrating again. Otherwise, implicitly return None.
4647
if self.use_cache:
@@ -52,6 +53,7 @@ def write_calibration_cache(self, cache):
5253
with open(self.cache_file, "wb") as f:
5354
f.write(cache)
5455

56+
5557
class TestAccuracy(ModelTestCase):
5658

5759
def setUp(self):

0 commit comments

Comments
 (0)