tensorflow/tensorflow

View on GitHub
tensorflow/python/training/session_manager_test.py

Summary

Maintainability
F
3 wks
Test Coverage

File session_manager_test.py has 718 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/session_manager_test.py - About 1 day to fix

    SessionManagerTest has 24 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class SessionManagerTest(test.TestCase):
    
      @classmethod
      def setUpClass(cls):
        super(SessionManagerTest, cls).setUpClass()
    Severity: Minor
    Found in tensorflow/python/training/session_manager_test.py - About 2 hrs to fix

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

        def testPrepareSessionFails(self):
          checkpoint_dir = os.path.join(self.get_temp_dir(), "prepare_session")
          checkpoint_dir2 = os.path.join(self.get_temp_dir(), "prepare_session2")
          try:
            gfile.DeleteRecursively(checkpoint_dir)
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 4 days to fix
      tensorflow/python/training/session_manager_test.py on lines 713..772

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

      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 testPrepareSessionFails(self):
          checkpoint_dir = os.path.join(self.get_temp_dir(), "prepare_session")
          checkpoint_dir2 = os.path.join(self.get_temp_dir(), "prepare_session2")
          try:
            gfile.DeleteRecursively(checkpoint_dir)
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 4 days to fix
      tensorflow/python/training/session_manager_test.py on lines 86..145

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

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

          with ops.Graph().as_default():
            v = variable_v1.VariableV1(1, name="v")
            sm = session_manager.SessionManager(
                ready_op=variables.assert_variables_initialized())
            saver = saver_lib.Saver({"v": v})
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 3 other locations - About 1 day to fix
      tensorflow/python/training/session_manager_test.py on lines 179..190
      tensorflow/python/training/session_manager_test.py on lines 234..245
      tensorflow/python/training/session_manager_test.py on lines 292..303

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

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

          with ops.Graph().as_default():
            v = variable_v1.VariableV1(1, name="v")
            sm = session_manager.SessionManager(
                ready_op=variables.report_uninitialized_variables())
            saver = saver_lib.Saver({"v": v})
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 3 other locations - About 1 day to fix
      tensorflow/python/training/session_manager_test.py on lines 179..190
      tensorflow/python/training/session_manager_test.py on lines 292..303
      tensorflow/python/training/session_manager_test.py on lines 783..794

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

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

          with ops.Graph().as_default():
            v = variable_v1.VariableV1(1, name="v")
            sm = session_manager.SessionManager(
                ready_op=variables.report_uninitialized_variables())
            saver = saver_lib.Saver({"v": v})
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 3 other locations - About 1 day to fix
      tensorflow/python/training/session_manager_test.py on lines 234..245
      tensorflow/python/training/session_manager_test.py on lines 292..303
      tensorflow/python/training/session_manager_test.py on lines 783..794

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

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

          with ops.Graph().as_default():
            v = variable_v1.VariableV1(1, name="v")
            sm = session_manager.SessionManager(
                ready_op=variables.report_uninitialized_variables())
            saver = saver_lib.Saver({"v": v})
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 3 other locations - About 1 day to fix
      tensorflow/python/training/session_manager_test.py on lines 179..190
      tensorflow/python/training/session_manager_test.py on lines 234..245
      tensorflow/python/training/session_manager_test.py on lines 783..794

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

      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 testPrepareSessionSucceedsWithInitFeedDict(self):
          with ops.Graph().as_default():
            p = array_ops.placeholder(dtypes.float32, shape=(3,))
            v = variable_v1.VariableV1(p, name="v")
            sm = session_manager.SessionManager(
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 7 hrs to fix
      tensorflow/python/training/session_manager_test.py on lines 692..702

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

      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 testPrepareSessionSucceedsWithInitFeedDict(self):
          with ops.Graph().as_default():
            p = array_ops.placeholder(dtypes.float32, shape=(3,))
            v = variable_v1.VariableV1(p, name="v")
            sm = session_manager.SessionManager(
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 7 hrs to fix
      tensorflow/python/training/session_manager_test.py on lines 53..63

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

      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 testPrepareSessionSucceedsWithInitFn(self):
          with ops.Graph().as_default():
            v = variable_v1.VariableV1([125], name="v")
            sm = session_manager.SessionManager(
                ready_op=variables.report_uninitialized_variables())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 6 hrs to fix
      tensorflow/python/training/session_manager_test.py on lines 704..711

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

      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 testPrepareSessionSucceedsWithInitFn(self):
          with ops.Graph().as_default():
            v = variable_v1.VariableV1([125], name="v")
            sm = session_manager.SessionManager(
                ready_op=variables.assert_variables_initialized())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 6 hrs to fix
      tensorflow/python/training/session_manager_test.py on lines 65..72

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

      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 testPrepareSessionSucceeds(self):
          with ops.Graph().as_default():
            v = variable_v1.VariableV1([1.0, 2.0, 3.0], name="v")
            sm = session_manager.SessionManager(
                ready_op=variables.report_uninitialized_variables())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 5 hrs to fix
      tensorflow/python/training/session_manager_test.py on lines 683..690

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

      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 testPrepareSessionSucceeds(self):
          with ops.Graph().as_default():
            v = variable_v1.VariableV1([1.0, 2.0, 3.0], name="v")
            sm = session_manager.SessionManager(
                ready_op=variables.assert_variables_initialized())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 5 hrs to fix
      tensorflow/python/training/session_manager_test.py on lines 44..51

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

      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 testWaitForSessionReturnsNoneAfterTimeout(self):
          with ops.Graph().as_default():
            variable_v1.VariableV1(1, name="v")
            sm = session_manager.SessionManager(
                ready_op=variables.assert_variables_initialized(),
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 4 hrs to fix
      tensorflow/python/training/session_manager_test.py on lines 202..211

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

      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 testWaitForSessionReturnsNoneAfterTimeout(self):
          with ops.Graph().as_default():
            variable_v1.VariableV1(1, name="v")
            sm = session_manager.SessionManager(
                ready_op=variables.report_uninitialized_variables(),
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 4 hrs to fix
      tensorflow/python/training/session_manager_test.py on lines 812..821

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

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

            with self.cached_session():
              self.assertEqual(False, variable_v1.is_variable_initialized(v).eval())
              self.assertEqual(False, variable_v1.is_variable_initialized(w).eval())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 6 other locations - About 1 hr to fix
      tensorflow/python/training/session_manager_test.py on lines 254..256
      tensorflow/python/training/session_manager_test.py on lines 312..314
      tensorflow/python/training/session_manager_test.py on lines 380..382
      tensorflow/python/training/session_manager_test.py on lines 608..610
      tensorflow/python/training/session_manager_test.py on lines 642..644
      tensorflow/python/training/session_manager_test.py on lines 664..666

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

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

            with self.cached_session():
              self.assertEqual(False, variable_v1.is_variable_initialized(v).eval())
              self.assertEqual(False, variable_v1.is_variable_initialized(w).eval())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 6 other locations - About 1 hr to fix
      tensorflow/python/training/session_manager_test.py on lines 312..314
      tensorflow/python/training/session_manager_test.py on lines 380..382
      tensorflow/python/training/session_manager_test.py on lines 608..610
      tensorflow/python/training/session_manager_test.py on lines 625..627
      tensorflow/python/training/session_manager_test.py on lines 642..644
      tensorflow/python/training/session_manager_test.py on lines 664..666

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

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

            with self.cached_session():
              self.assertEqual(False, variable_v1.is_variable_initialized(v).eval())
              self.assertEqual(False, variable_v1.is_variable_initialized(w).eval())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 6 other locations - About 1 hr to fix
      tensorflow/python/training/session_manager_test.py on lines 254..256
      tensorflow/python/training/session_manager_test.py on lines 312..314
      tensorflow/python/training/session_manager_test.py on lines 608..610
      tensorflow/python/training/session_manager_test.py on lines 625..627
      tensorflow/python/training/session_manager_test.py on lines 642..644
      tensorflow/python/training/session_manager_test.py on lines 664..666

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

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

            with self.cached_session():
              self.assertEqual(False, variable_v1.is_variable_initialized(v).eval())
              self.assertEqual(False, variable_v1.is_variable_initialized(w).eval())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 6 other locations - About 1 hr to fix
      tensorflow/python/training/session_manager_test.py on lines 254..256
      tensorflow/python/training/session_manager_test.py on lines 312..314
      tensorflow/python/training/session_manager_test.py on lines 380..382
      tensorflow/python/training/session_manager_test.py on lines 625..627
      tensorflow/python/training/session_manager_test.py on lines 642..644
      tensorflow/python/training/session_manager_test.py on lines 664..666

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

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

            with self.cached_session():
              self.assertEqual(False, variable_v1.is_variable_initialized(v).eval())
              self.assertEqual(False, variable_v1.is_variable_initialized(w).eval())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 6 other locations - About 1 hr to fix
      tensorflow/python/training/session_manager_test.py on lines 254..256
      tensorflow/python/training/session_manager_test.py on lines 312..314
      tensorflow/python/training/session_manager_test.py on lines 380..382
      tensorflow/python/training/session_manager_test.py on lines 608..610
      tensorflow/python/training/session_manager_test.py on lines 625..627
      tensorflow/python/training/session_manager_test.py on lines 664..666

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

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

            with self.cached_session():
              self.assertEqual(False, variable_v1.is_variable_initialized(v).eval())
              self.assertEqual(False, variable_v1.is_variable_initialized(w).eval())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 6 other locations - About 1 hr to fix
      tensorflow/python/training/session_manager_test.py on lines 254..256
      tensorflow/python/training/session_manager_test.py on lines 380..382
      tensorflow/python/training/session_manager_test.py on lines 608..610
      tensorflow/python/training/session_manager_test.py on lines 625..627
      tensorflow/python/training/session_manager_test.py on lines 642..644
      tensorflow/python/training/session_manager_test.py on lines 664..666

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

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

            with self.cached_session():
              self.assertEqual(False, variable_v1.is_variable_initialized(v).eval())
              self.assertEqual(False, variable_v1.is_variable_initialized(w).eval())
      Severity: Major
      Found in tensorflow/python/training/session_manager_test.py and 6 other locations - About 1 hr to fix
      tensorflow/python/training/session_manager_test.py on lines 254..256
      tensorflow/python/training/session_manager_test.py on lines 312..314
      tensorflow/python/training/session_manager_test.py on lines 380..382
      tensorflow/python/training/session_manager_test.py on lines 608..610
      tensorflow/python/training/session_manager_test.py on lines 625..627
      tensorflow/python/training/session_manager_test.py on lines 642..644

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

      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

            sm2 = session_manager.SessionManager(
                ready_op=variables.report_uninitialized_variables(),
                ready_for_local_init_op=variables.report_uninitialized_variables(
                    variables.global_variables()),
                local_init_op=w.initializer)
      Severity: Minor
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 45 mins to fix
      tensorflow/python/training/session_manager_test.py on lines 645..649

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

      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

            sm2 = session_manager.SessionManager(
                ready_op=variables.report_uninitialized_variables(),
                ready_for_local_init_op=variables.report_uninitialized_variables(
                    variables.global_variables()),
                local_init_op=w.initializer)
      Severity: Minor
      Found in tensorflow/python/training/session_manager_test.py and 1 other location - About 45 mins to fix
      tensorflow/python/training/session_manager_test.py on lines 257..261

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

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

            x_res = variable_v1.VariableV1(
                3 * v_res,
                trainable=False,
                collections=[ops.GraphKeys.LOCAL_VARIABLES],
      Severity: Minor
      Found in tensorflow/python/training/session_manager_test.py and 2 other locations - About 35 mins to fix
      tensorflow/python/training/session_manager_test.py on lines 481..484
      tensorflow/python/training/session_manager_test.py on lines 521..524

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

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

            x = variable_v1.VariableV1(
                3 * v,
                trainable=False,
                collections=[ops.GraphKeys.LOCAL_VARIABLES],
      Severity: Minor
      Found in tensorflow/python/training/session_manager_test.py and 2 other locations - About 35 mins to fix
      tensorflow/python/training/session_manager_test.py on lines 521..524
      tensorflow/python/training/session_manager_test.py on lines 533..536

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

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

            x = variable_v1.VariableV1(
                3 * v,
                trainable=False,
                collections=[ops.GraphKeys.LOCAL_VARIABLES],
      Severity: Minor
      Found in tensorflow/python/training/session_manager_test.py and 2 other locations - About 35 mins to fix
      tensorflow/python/training/session_manager_test.py on lines 481..484
      tensorflow/python/training/session_manager_test.py on lines 533..536

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

      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

      There are no issues that match your filters.

      Category
      Status