tensorflow/tensorflow

View on GitHub

Showing 21,127 of 21,127 total issues

File values.py has 1373 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/values.py - About 3 days to fix

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

    Severity: Major
    Found in third_party/llvm_openmp/expand_cmake_vars.py and 2 other locations - About 3 days to fix
    third_party/xla/third_party/llvm_openmp/expand_cmake_vars.py on lines 0..85
    third_party/xla/third_party/tsl/third_party/llvm_openmp/expand_cmake_vars.py on lines 0..85

    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 372.

    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 3 locations. Consider refactoring.
    Open

    third_party/llvm_openmp/expand_cmake_vars.py on lines 0..85
    third_party/xla/third_party/llvm_openmp/expand_cmake_vars.py on lines 0..85

    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 372.

    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 3 locations. Consider refactoring.
    Open

    Severity: Major
    Found in third_party/xla/third_party/llvm_openmp/expand_cmake_vars.py and 2 other locations - About 3 days to fix
    third_party/llvm_openmp/expand_cmake_vars.py on lines 0..85
    third_party/xla/third_party/tsl/third_party/llvm_openmp/expand_cmake_vars.py on lines 0..85

    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 372.

    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 1357 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/control_flow_ops_test.py - About 3 days to fix

      File convert_to_constants_test.py has 1351 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/framework/convert_to_constants_test.py - About 3 days to fix

        File nest_util.py has 1350 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # Copyright 2023 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/util/nest_util.py - About 3 days to fix

          File cfg_test.py has 1346 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/autograph/pyct/cfg_test.py - About 3 days to fix

            File fifo_queue_test.py has 1341 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/data_structures/fifo_queue_test.py - About 3 days to fix

              File rnn.py has 1335 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/rnn.py - About 3 days to fix

                File save.py has 1332 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/saved_model/save.py - About 3 days to fix

                  File basic_session_run_hooks_test.py has 1323 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/basic_session_run_hooks_test.py - About 3 days to fix

                    File cluster_coordinator.py has 1322 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.py - About 3 days to fix

                      File input.py has 1321 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.py - About 3 days to fix

                        File save_test.py has 1318 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/saved_model/save_test.py - About 3 days to fix

                          File polymorphic_function.py has 1317 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/eager/polymorphic_function/polymorphic_function.py - About 3 days to fix

                            File tpu_embedding_v2.py has 1313 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/tpu/tpu_embedding_v2.py - About 3 days to fix

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

                                def test_fills_cols_to_vars_partitioned_variables(self):
                                  price1 = fc.numeric_column('price1')
                                  dense_feature = fc.numeric_column('dense_feature')
                                  dense_feature_bucketized = fc.bucketized_column(
                                      dense_feature, boundaries=[0.])
                              Severity: Major
                              Found in tensorflow/python/feature_column/feature_column_v2_test.py and 1 other location - About 3 days to fix
                              tensorflow/python/feature_column/feature_column_test.py on lines 2869..2900

                              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 356.

                              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

                                def test_fills_cols_to_vars_partitioned_variables(self):
                                  price1 = fc._numeric_column('price1')
                                  dense_feature = fc._numeric_column('dense_feature')
                                  dense_feature_bucketized = fc._bucketized_column(
                                      dense_feature, boundaries=[0.])
                              Severity: Major
                              Found in tensorflow/python/feature_column/feature_column_test.py and 1 other location - About 3 days to fix
                              tensorflow/python/feature_column/feature_column_v2_test.py on lines 2583..2614

                              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 356.

                              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 analyzer_cli.py has 1311 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/cli/analyzer_cli.py - About 3 days to fix
                                Severity
                                Category
                                Status
                                Source
                                Language