tensorflow/models

View on GitHub
official/vision/modeling/layers/nn_blocks_test.py

Summary

Maintainability
F
3 days
Test Coverage

File nn_blocks_test.py has 841 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2024 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Severity: Major
Found in official/vision/modeling/layers/nn_blocks_test.py - About 2 days to fix

    Function test_universalinvertedbottleneck_block_layer_scale_creation has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      def test_universalinvertedbottleneck_block_layer_scale_creation(
    Severity: Major
    Found in official/vision/modeling/layers/nn_blocks_test.py - About 1 hr to fix

      Function test_multi_query_attention_with_downsampling has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def test_multi_query_attention_with_downsampling(
      Severity: Major
      Found in official/vision/modeling/layers/nn_blocks_test.py - About 1 hr to fix

        Function test_multi_head_self_attention has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          def test_multi_head_self_attention(
        Severity: Major
        Found in official/vision/modeling/layers/nn_blocks_test.py - About 1 hr to fix

          Function test_layer_with_feedforward_cls_restoration_from_config has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def test_layer_with_feedforward_cls_restoration_from_config(self):
              sequence_length = 21
              width = 80
          
              call_list = []
          Severity: Minor
          Found in official/vision/modeling/layers/nn_blocks_test.py - About 1 hr to fix

            Function test_universalinvertedbottleneck_block_creation has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              def test_universalinvertedbottleneck_block_creation(
            Severity: Major
            Found in official/vision/modeling/layers/nn_blocks_test.py - About 1 hr to fix

              Function test_multi_query_attention_v1 has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                def test_multi_query_attention_v1(
              Severity: Major
              Found in official/vision/modeling/layers/nn_blocks_test.py - About 50 mins to fix

                Function test_multi_query_attention_v2 has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  def test_multi_query_attention_v2(
                Severity: Major
                Found in official/vision/modeling/layers/nn_blocks_test.py - About 50 mins to fix

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

                    def test_bottleneck_block_creation(self, block_fn, strides, use_projection,
                  Severity: Minor
                  Found in official/vision/modeling/layers/nn_blocks_test.py - About 35 mins to fix

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

                      def test_residual_block_creation(self, block_fn, strides, use_projection,
                    Severity: Minor
                    Found in official/vision/modeling/layers/nn_blocks_test.py - About 35 mins to fix

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

                        def test_invertedbottleneck_block_creation(self, block_fn, expand_ratio,
                      Severity: Minor
                      Found in official/vision/modeling/layers/nn_blocks_test.py - About 35 mins to fix

                        There are no issues that match your filters.

                        Category
                        Status