tensorflow/tensorflow

View on GitHub

Showing 21,083 of 21,083 total issues

File saver_test.py has 2450 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/training/saver_test.py - About 6 days to fix

    File training.py has 2435 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/keras/engine/training.py - About 6 days to fix

      File ragged_tensor.py has 2398 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/ops/ragged/ragged_tensor.py - About 6 days to fix

        File base_layer.py has 2394 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/keras/engine/base_layer.py - About 6 days to fix

          File pooling_ops_test.py has 2347 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/nn_ops/pooling_ops_test.py - About 6 days to fix

            File context.py has 2292 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/eager/context.py - About 6 days to fix

              File variable_scope.py has 2288 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/variable_scope.py - About 6 days to fix

                File resource_variable_ops.py has 2278 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/resource_variable_ops.py - About 6 days to fix

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    @parameterized.named_parameters([
                        dict(
                            testcase_name="scalar_int32",
                            row_partitions=None,
                            shape=(),
                  Severity: Major
                  Found in tensorflow/python/ops/structured/structured_array_ops_test.py and 1 other location - About 6 days to fix
                  tensorflow/python/ops/structured/structured_array_ops_test.py on lines 478..584

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 633.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    @parameterized.named_parameters([
                        dict(
                            testcase_name="scalar_int32",
                            row_partitions=None,
                            shape=(),
                  Severity: Major
                  Found in tensorflow/python/ops/structured/structured_array_ops_test.py and 1 other location - About 6 days to fix
                  tensorflow/python/ops/structured/structured_array_ops_test.py on lines 328..434

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 633.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  File callbacks.py has 2267 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/keras/callbacks.py - About 6 days to fix

                    File lite_test.py has 2236 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/lite/python/lite_test.py - About 6 days to fix

                      File parsing_ops_test.py has 2197 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/io_ops/parsing_ops_test.py - About 6 days to fix

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                        third_party/gpus/find_sycl_config.py on lines 0..139

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 608.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                        Severity: Major
                        Found in third_party/gpus/find_sycl_config.py and 1 other location - About 6 days to fix
                        third_party/xla/third_party/tsl/third_party/gpus/find_sycl_config.py on lines 0..139

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 608.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        File control_flow_ops_test.py has 2120 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/ops/parallel_for/control_flow_ops_test.py - About 5 days to fix

                          File tf_upgrade_v2.py has 2113 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/tools/compatibility/tf_upgrade_v2.py - About 5 days to fix

                            File checkpoint.py has 2092 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            """Utilities for saving/loading Trackable objects."""
                            # 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.
                            Severity: Major
                            Found in tensorflow/python/checkpoint/checkpoint.py - About 5 days to fix

                              File input_test.py has 2078 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/training/input_test.py - About 5 days to fix

                                File array_ops_test.py has 2060 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/array_ops/array_ops_test.py - About 5 days to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language