tensorflow/models

View on GitHub

Showing 11,634 of 11,634 total issues

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

    input_specs = tf_keras.layers.InputSpec(
        shape=[None, input_size[0], input_size[1], 3])
Severity: Major
Found in official/projects/qat/vision/modeling/factory_test.py and 4 other locations - About 30 mins to fix
official/projects/qat/vision/modeling/factory_test.py on lines 50..51
official/projects/qat/vision/modeling/factory_test.py on lines 95..96
official/projects/qat/vision/modeling/factory_test.py on lines 220..221
official/vision/modeling/backbones/spinenet_test.py on lines 71..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 32.

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

    self.assertAllEqual(
        [],
        seq_feature_dict['region/label/string'].feature[1].bytes_list.value[:])
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

    self.assertAllClose(
        [],
        seq_feature_dict['region/bbox/ymax'].feature[1].float_list.value[:])
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

    self.assertAllClose(
        [],
        seq_feature_dict[
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

    self.assertAllClose(
        [],
        seq_feature_dict['region/bbox/ymin'].feature[1].float_list.value[:])
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

      input_specs = tf_keras.layers.InputSpec(
          shape=[None, input_size[0], input_size[1], 3])
Severity: Major
Found in official/vision/modeling/backbones/spinenet_test.py and 4 other locations - About 30 mins to fix
official/projects/qat/vision/modeling/factory_test.py on lines 50..51
official/projects/qat/vision/modeling/factory_test.py on lines 95..96
official/projects/qat/vision/modeling/factory_test.py on lines 184..185
official/projects/qat/vision/modeling/factory_test.py on lines 220..221

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

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

    if config_box_predictor.HasField('box_encodings_clip_range'):
      box_encodings_clip_range = BoxEncodingsClipRange(
          min=config_box_predictor.box_encodings_clip_range.min,
          max=config_box_predictor.box_encodings_clip_range.max)
Severity: Major
Found in research/object_detection/builders/box_predictor_builder.py and 3 other locations - About 30 mins to fix
research/object_detection/builders/box_predictor_builder.py on lines 707..710
research/object_detection/builders/box_predictor_builder.py on lines 870..873
research/object_detection/builders/box_predictor_builder.py on lines 910..913

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

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

    if config_box_predictor.HasField('box_encodings_clip_range'):
      box_encodings_clip_range = BoxEncodingsClipRange(
          min=config_box_predictor.box_encodings_clip_range.min,
          max=config_box_predictor.box_encodings_clip_range.max)
Severity: Major
Found in research/object_detection/builders/box_predictor_builder.py and 3 other locations - About 30 mins to fix
research/object_detection/builders/box_predictor_builder.py on lines 707..710
research/object_detection/builders/box_predictor_builder.py on lines 744..747
research/object_detection/builders/box_predictor_builder.py on lines 910..913

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

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

    self.assertAllClose(
        [],
        seq_feature_dict['region/bbox/xmin'].feature[1].float_list.value[:])
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

    self.assertAllClose(
        [],
        seq_feature_dict['region/bbox/ymax'].feature[1].float_list.value[:])
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

    self.assertAllClose(
        [],
        seq_feature_dict['region/bbox/xmin'].feature[1].float_list.value[:])
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

    self.assertAllEqual(
        [],
        seq_feature_dict['region/label/string'].feature[1].bytes_list.value[:])
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

    self.assertAllClose(
        [],
        seq_feature_dict[
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

    self.assertAllClose(
        [],
        seq_feature_dict[
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473

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

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

    if config_box_predictor.HasField('box_encodings_clip_range'):
      box_encodings_clip_range = BoxEncodingsClipRange(
          min=config_box_predictor.box_encodings_clip_range.min,
          max=config_box_predictor.box_encodings_clip_range.max)
Severity: Major
Found in research/object_detection/builders/box_predictor_builder.py and 3 other locations - About 30 mins to fix
research/object_detection/builders/box_predictor_builder.py on lines 744..747
research/object_detection/builders/box_predictor_builder.py on lines 870..873
research/object_detection/builders/box_predictor_builder.py on lines 910..913

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

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

    self.assertAllClose(
        [],
        seq_feature_dict['region/bbox/xmax'].feature[1].float_list.value[:])
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

    self.assertAllClose(
        [],
        seq_feature_dict['region/bbox/xmax'].feature[1].float_list.value[:])
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 455..457
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

    input_specs = tf_keras.layers.InputSpec(
        shape=[None, input_size[0], input_size[1], 3])
Severity: Major
Found in official/projects/qat/vision/modeling/factory_test.py and 4 other locations - About 30 mins to fix
official/projects/qat/vision/modeling/factory_test.py on lines 50..51
official/projects/qat/vision/modeling/factory_test.py on lines 184..185
official/projects/qat/vision/modeling/factory_test.py on lines 220..221
official/vision/modeling/backbones/spinenet_test.py on lines 71..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 32.

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

    input_specs = tf_keras.layers.InputSpec(
        shape=[None, input_size[0], input_size[1], 3])
Severity: Major
Found in official/projects/qat/vision/modeling/factory_test.py and 4 other locations - About 30 mins to fix
official/projects/qat/vision/modeling/factory_test.py on lines 50..51
official/projects/qat/vision/modeling/factory_test.py on lines 95..96
official/projects/qat/vision/modeling/factory_test.py on lines 184..185
official/vision/modeling/backbones/spinenet_test.py on lines 71..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 32.

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

    self.assertAllClose(
        [],
        seq_feature_dict[
research/object_detection/dataset_tools/seq_example_util_test.py on lines 190..192
research/object_detection/dataset_tools/seq_example_util_test.py on lines 193..195
research/object_detection/dataset_tools/seq_example_util_test.py on lines 196..198
research/object_detection/dataset_tools/seq_example_util_test.py on lines 199..201
research/object_detection/dataset_tools/seq_example_util_test.py on lines 202..204
research/object_detection/dataset_tools/seq_example_util_test.py on lines 307..309
research/object_detection/dataset_tools/seq_example_util_test.py on lines 310..312
research/object_detection/dataset_tools/seq_example_util_test.py on lines 313..315
research/object_detection/dataset_tools/seq_example_util_test.py on lines 316..318
research/object_detection/dataset_tools/seq_example_util_test.py on lines 319..321
research/object_detection/dataset_tools/seq_example_util_test.py on lines 459..461
research/object_detection/dataset_tools/seq_example_util_test.py on lines 463..465
research/object_detection/dataset_tools/seq_example_util_test.py on lines 467..469
research/object_detection/dataset_tools/seq_example_util_test.py on lines 471..473
research/object_detection/dataset_tools/seq_example_util_test.py on lines 475..477

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

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

Severity
Category
Status
Source
Language