tensorflow/models

View on GitHub

Showing 4,999 of 11,531 total issues

File utils.py has 1056 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/projects/videoglue/datasets/common/utils.py - About 2 days to fix

    File xlnet_modeling.py has 1049 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/legacy/xlnet/xlnet_modeling.py - About 2 days to fix

      Function convert_examples_to_features has a Cognitive Complexity of 128 (exceeds 5 allowed). Consider refactoring.
      Open

      def convert_examples_to_features(examples, sp_model, max_seq_length, doc_stride,
                                       max_query_length, is_training, output_fn,
                                       uncased):
        """Loads a data file into a list of `InputBatch`s."""
      
      
      Severity: Minor
      Found in official/legacy/xlnet/squad_utils.py - About 2 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      File config_util.py has 1024 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # Copyright 2017 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 research/object_detection/utils/config_util.py - About 2 days to fix

        File object_detection_evaluation_test.py has 1023 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # Copyright 2017 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 research/object_detection/utils/object_detection_evaluation_test.py - About 2 days to fix

          File preprocess_ops.py has 1023 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/ops/preprocess_ops.py - About 2 days to fix

            File inputs.py has 1020 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # Copyright 2017 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 research/object_detection/inputs.py - About 2 days to fix

              File model_lib.py has 997 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # Copyright 2017 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 research/object_detection/model_lib.py - About 2 days to fix

                File box_list_ops.py has 994 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # Copyright 2017 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 research/object_detection/core/box_list_ops.py - About 2 days to fix

                  File box_list_ops_test.py has 986 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # Copyright 2017 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 research/object_detection/core/box_list_ops_test.py - About 2 days to fix

                    File ops.py has 977 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # Copyright 2017 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 research/object_detection/utils/ops.py - About 2 days to fix

                      File hyperparams_builder_test.py has 972 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      # Copyright 2017 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 research/object_detection/builders/hyperparams_builder_test.py - About 2 days to fix

                        File model_lib_v2.py has 950 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        # Copyright 2019 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 research/object_detection/model_lib_v2.py - About 2 days to fix

                          File nn_blocks.py has 950 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/projects/qat/vision/modeling/layers/nn_blocks.py - About 2 days to fix

                            File mobilenet_edgetpu_v2_model_blocks.py has 942 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

                              File tf_example_decoder.py has 926 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              # Copyright 2017 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 research/object_detection/data_decoders/tf_example_decoder.py - About 2 days to fix

                                File active_vision_dataset_env.py has 912 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                # Copyright 2018 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 research/cognitive_planning/envs/active_vision_dataset_env.py - About 2 days to fix

                                  File visualization_utils.py has 910 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/utils/object_detection/visualization_utils.py - About 2 days to fix

                                    File box_predictor_builder.py has 898 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    # Copyright 2017 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 research/object_detection/builders/box_predictor_builder.py - About 2 days to fix

                                      File ssd_efficientnet_bifpn_feature_extractor.py has 896 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      # Copyright 2020 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
                                        Category
                                        Status
                                        Source
                                        Language