tensorflow/models

View on GitHub
research/object_detection/utils/learning_schedules.py

Summary

Maintainability
B
4 hrs
Test Coverage

Function exponential_decay_with_burnin has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

def exponential_decay_with_burnin(global_step,
Severity: Major
Found in research/object_detection/utils/learning_schedules.py - About 1 hr to fix

    Function exponential_decay_with_warmup has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def exponential_decay_with_warmup(global_step,
    Severity: Major
    Found in research/object_detection/utils/learning_schedules.py - About 1 hr to fix

      Function manual_stepping has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      def manual_stepping(global_step, boundaries, rates, warmup=False):
        """Manually stepped learning rate schedule.
      
        This function provides fine grained control over learning rates.  One must
        specify a sequence of learning rates as well as a set of integer steps
      Severity: Minor
      Found in research/object_detection/utils/learning_schedules.py - About 55 mins 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

      Function cosine_decay_with_warmup has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      def cosine_decay_with_warmup(global_step,
                                   learning_rate_base,
                                   total_steps,
                                   warmup_learning_rate=0.0,
                                   warmup_steps=0,
      Severity: Minor
      Found in research/object_detection/utils/learning_schedules.py - About 45 mins 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

      Function cosine_decay_with_warmup has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def cosine_decay_with_warmup(global_step,
      Severity: Minor
      Found in research/object_detection/utils/learning_schedules.py - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status