tensorflow/tensorflow

View on GitHub

Showing 8,379 of 21,083 total issues

File losses_test.py has 1303 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2016 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 tensorflow/python/kernel_tests/nn_ops/losses_test.py - About 3 days to fix

    File tpu.py has 1286 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 tensorflow/python/tpu/tpu.py - About 3 days to fix

      File extension_type_test.py has 1274 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # Copyright 2021 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 tensorflow/python/framework/extension_type_test.py - About 3 days to fix

        File monitored_session.py has 1269 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # pylint: disable=g-bad-file-header
        # Copyright 2016 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.
        Severity: Major
        Found in tensorflow/python/training/monitored_session.py - About 3 days to fix

          File linear_operator.py has 1263 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # Copyright 2016 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 tensorflow/python/ops/linalg/linear_operator.py - About 3 days to fix

            File data_adapter.py has 1263 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 tensorflow/python/keras/engine/data_adapter.py - About 3 days to fix

              Function model_iteration has a Cognitive Complexity of 161 (exceeds 5 allowed). Consider refactoring.
              Open

              def model_iteration(model,
                                  inputs,
                                  targets=None,
                                  sample_weights=None,
                                  batch_size=None,
              Severity: Minor
              Found in tensorflow/python/keras/engine/training_arrays_v1.py - About 3 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 debug_data.py has 1255 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # Copyright 2016 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 tensorflow/python/debug/lib/debug_data.py - About 3 days to fix

                File linalg_impl.py has 1249 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 tensorflow/python/ops/linalg/linalg_impl.py - About 3 days to fix

                  File quantize_model_test_base.py has 1247 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # Copyright 2022 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 padding_fifo_queue_test.py has 1244 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # Copyright 2015 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 segment_reduction_ops_test.py has 1238 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      # Copyright 2015 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 tensorflow/python/kernel_tests/math_ops/segment_reduction_ops_test.py - About 3 days to fix

                        File np_math_ops.py has 1237 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: Major
                        Found in tensorflow/python/ops/numpy_ops/np_math_ops.py - About 3 days to fix

                          File tensor_array_ops.py has 1230 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          # Copyright 2015 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 tensorflow/python/ops/tensor_array_ops.py - About 3 days to fix

                            File mirrored_strategy_test.py has 1226 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 tensorflow/python/distribute/mirrored_strategy_test.py - About 3 days to fix

                              File cluster_coordinator_test.py has 1221 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: Major
                              Found in tensorflow/python/distribute/coordinator/cluster_coordinator_test.py - About 3 days to fix

                                File ctc_ops.py has 1205 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                # Copyright 2016 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 tensorflow/python/ops/ctc_ops.py - About 3 days to fix

                                  File tfr_gen.py has 1203 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: Major
                                  Found in tensorflow/compiler/mlir/tfr/python/tfr_gen.py - About 3 days to fix

                                    File tensor_shape.py has 1189 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    # Copyright 2015 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 tensorflow/python/framework/tensor_shape.py - About 3 days to fix

                                      File tpu_strategy_test.py has 1184 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 tensorflow/python/distribute/tpu_strategy_test.py - About 3 days to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language