Showing 11,634 of 11,634 total issues
Function critic_net
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def critic_net(states, actions,
for_critic_loss=False,
num_reward_dims=1,
states_hidden_layers=(400,),
actions_hidden_layers=None,
- 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 evaluate_checkpoint_repeatedly
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def evaluate_checkpoint_repeatedly(checkpoint_dir,
evaluate_checkpoint_fn,
eval_interval_secs=600,
max_number_of_evaluations=None,
checkpoint_timeout=None,
- 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 compute_rewards
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def compute_rewards(self, mode, states, actions, rewards, next_states,
Avoid deeply nested control flow statements. Open
for image_id in data[world]:
self._eval_init_points.append((world, image_id[0], goal))
logging.info('loaded %d eval init points', len(self._eval_init_points))
Function false_fn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def false_fn(agent, state, action, transition_type, environment_steps,
Function _compute_kp_heatmap_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _compute_kp_heatmap_loss(self, input_height, input_width, task_name,
Function compute_spectrogram_feature
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def compute_spectrogram_feature(samples, sample_rate, stride_ms=10.0,
Function relative_context_multi_transition_fn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def relative_context_multi_transition_fn(
Function reset
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def reset(self, mode, agent=None, action_fn=None, state=None):
"""Returns ops that reset the context.
Args:
mode: a string representing the mode=[train, explore, eval].
- 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 prediction_tensors_to_keypoint_candidates
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def prediction_tensors_to_keypoint_candidates(keypoint_heatmap_predictions,
Function _score_to_distance_map
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _score_to_distance_map(y_grid, x_grid, heatmap, points_y, points_x,
Function env_restart
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def env_restart(agent, state, action, transition_type, environment_steps,
Function true_fn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def true_fn(agent, state, action, transition_type, environment_steps,
Function action_embed_net
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def action_embed_net(
actions,
states=None,
num_output_dims=2,
hidden_layers=(400, 300),
- 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 timer_context_fn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def timer_context_fn(contexts,
Function prediction_to_single_instance_keypoints
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def prediction_to_single_instance_keypoints(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, num_rnn_layers, rnn_type, is_bidirectional,
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
is_training,
num_classes,
image_resizer_fn,
feature_extractor,
- 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 continuous_eval_generator
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def continuous_eval_generator(estimator,
Function _scatter_keypoints_to_batch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _scatter_keypoints_to_batch(self, num_ind, kpt_coords_for_example,