tensorflow/models

View on GitHub
research/object_detection/meta_architectures/deepmac_meta_arch_test.py

Summary

Maintainability
F
5 days
Test Coverage

File deepmac_meta_arch_test.py has 1450 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Tests for google3.third_party.tensorflow_models.object_detection.meta_architectures.deepmac_meta_arch."""

import functools
import math
import random
Severity: Major
Found in research/object_detection/meta_architectures/deepmac_meta_arch_test.py - About 3 days to fix

    DeepMACMetaArchTest has 39 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class DeepMACMetaArchTest(tf.test.TestCase, parameterized.TestCase):
    
      # TODO(vighneshb): Add batch_size > 1 tests for loss functions.
    
      def setUp(self):  # pylint:disable=g-missing-super-call

      DeepMACUtilsTest has 26 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class DeepMACUtilsTest(tf.test.TestCase, parameterized.TestCase):
      
        def test_proto_parse(self):
      
          proto = center_net_pb2.CenterNet().DeepMACMaskEstimation()

        Function test_transform_images_and_boxes has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def test_transform_images_and_boxes(self):
            images = np.zeros((2, 32, 32, 3), dtype=np.float32)
            images[:, 14:19, 14:19, :] = 1.0
            boxes = tf.constant(
                [[[14.0 / 32, 14.0 / 32, 18.0 / 32, 18.0 / 32]] * 2] * 2)

          Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            def __init__(self,
          Severity: Minor
          Found in research/object_detection/meta_architectures/deepmac_meta_arch_test.py - About 35 mins to fix

            Function test_mask_network has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              def test_mask_network(self, mask_net, mask_net_channels,
            Severity: Minor
            Found in research/object_detection/meta_architectures/deepmac_meta_arch_test.py - About 35 mins to fix

              There are no issues that match your filters.

              Category
              Status