Showing 11,634 of 11,634 total issues
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _instantiate_sub_tasks
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _instantiate_sub_tasks(self) -> Dict[Text, tf_keras.Model]:
tasks = {}
for model_config in self._config.heads:
# Build supervised head
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _process_segment_and_label
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _process_segment_and_label(video_matrix, num_frames, contexts,
segment_labels, segment_size,
num_classes) -> Dict[str, tf.Tensor]:
"""Processes a batched Tensor of frames.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function call
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def call(
self, inputs: tf.Tensor, num_frames: Any = None,
) -> tf.Tensor:
# L2 normalize input features
activation = tf.nn.l2_normalize(inputs, -1)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(self, model: tf_keras.Model):
"""Loading pretrained checkpoint."""
if not self.task_config.init_checkpoint:
return
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function call
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def call(self, # pytype: disable=signature-mismatch # overriding-parameter-count-checks
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function call
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def call(self, inputs, training=None, **kwargs): # pytype: disable=signature-mismatch # overriding-parameter-count-checks
model_outputs = {}
if training and self._mode == PRETRAIN:
num_transforms = 2
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(self, model: tf_keras.Model):
"""Loads pretrained checkpoint."""
if not self.task_config.init_checkpoint:
return
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function build
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def build(self, input_specs: Mapping[str, tf.TensorShape]):
self._decoder_output_level = int(min(input_specs.keys()))
if self._config_dict['min_level'] < self._decoder_output_level:
raise ValueError('The min_level should be >= decoder output '
'level, but {} < {}'.format(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _make_features
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _make_features(self, stride_index: int, paragraph_texts: List[Text],
Function _process_segment_and_label
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _process_segment_and_label(video_matrix, num_frames, contexts,
Function color_jitter_nonrand
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def color_jitter_nonrand(image,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function generate_outputs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def generate_outputs(
self,
raw_scores: Dict[str, tf.Tensor],
raw_boxes: Dict[str, tf.Tensor],
raw_attributes: Dict[str, Dict[str, tf.Tensor]],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _parse_range_image_and_top_pose
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _parse_range_image_and_top_pose(
self, frame: dataset_pb2.Frame
) -> Tuple[Mapping[int, List[dataset_pb2.MatrixFloat]],
Optional[dataset_pb2.MatrixFloat]]:
"""Parse range images and top pose given a frame.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function build_metrics
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def build_metrics(self, training: bool = True) -> List[tf.metrics.Metric]:
"""Define metrics and how to calculate them."""
# train/validation loss metrics
loss_names = [
'class_loss', 'box_loss', 'attribute_loss', 'model_loss', 'total_loss'
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function generate_outputs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_outputs(
Function color_jitter_rand
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def color_jitter_rand(image,