tensorflow/models

View on GitHub

Showing 11,634 of 11,634 total issues

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

    self.assertAllEqual(
        [],
        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 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 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 870..873

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

    self._assertProtoEqual(
        example.features.feature['image/object/class/text'].bytes_list.value,
        [six.b('car')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/format'].bytes_list.value,
        [six.b('jpeg')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/object/view'].bytes_list.value,
        [six.b('')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105

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

    self._assertProtoEqual(
        example.features.feature['image/object/class/text'].bytes_list.value,
        [six.b('person')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/format'].bytes_list.value,
        [six.b('jpeg')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/object/class/text'].bytes_list.value,
        [six.b('person')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/object/class/text'].bytes_list.value,
        [six.b('dog')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/format'].bytes_list.value,
        [six.b('jpeg')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/object/class/text'].bytes_list.value,
        [six.b('cat')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/format'].bytes_list.value,
        [six.b('png')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/object/class/text'].bytes_list.value,
        [six.b('person')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/format'].bytes_list.value,
        [six.b('jpeg')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 282..284
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self._assertProtoEqual(
        example.features.feature['image/format'].bytes_list.value,
        [six.b('jpeg')])
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 106..108
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 121..123
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 173..175
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 188..190
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 297..299
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 399..401
research/object_detection/dataset_tools/create_coco_tf_record_test.py on lines 414..416
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 83..85
research/object_detection/dataset_tools/create_kitti_tf_record_test.py on lines 98..100
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 88..90
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 103..105
research/object_detection/dataset_tools/create_pascal_tf_record_test.py on lines 115..117

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

    self.assertEqual(
        example['video_matrix'].shape.as_list(),
        [batch_size, expected_num_frames, sum(params.feature_sizes)],
Severity: Minor
Found in official/projects/yt8m/dataloaders/yt8m_input_test.py and 2 other locations - About 30 mins to fix
official/projects/yt8m/dataloaders/yt8m_input_test.py on lines 88..90
official/projects/yt8m/dataloaders/yt8m_input_test.py on lines 139..141

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

      weights_multiple = tf.concat(
          [tf.ones_like(weights_shape), tf.constant([3])],
Severity: Minor
Found in research/object_detection/core/losses_test.py and 2 other locations - About 30 mins to fix
research/object_detection/core/losses_test.py on lines 949..950
research/object_detection/core/losses_test.py on lines 1016..1017

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

      weights_multiple = tf.concat(
          [tf.ones_like(weights_shape), tf.constant([3])],
Severity: Minor
Found in research/object_detection/core/losses_test.py and 2 other locations - About 30 mins to fix
research/object_detection/core/losses_test.py on lines 949..950
research/object_detection/core/losses_test.py on lines 982..983

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