Showing 11,634 of 11,634 total issues
Function run_epoch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def run_epoch(self, datasets, ops_to_eval, kind="train", batch_size=None,
Function documents
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def documents(dataset='train',
include_unlabeled=False,
include_validation=False):
"""Generates Documents based on FLAGS.dataset.
- 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 decode_beam_search
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def decode_beam_search(self,
Function select_inputs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def select_inputs(decoder_inputs, action, local_step, is_training, is_quantized,
Function conv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def conv2d(inputs,
Avoid deeply nested control flow statements. Open
if content.startswith('review/text'):
yield Document(
content=content,
is_validation=False,
is_test=False,
Function write_model_samples
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def write_model_samples(self, dataset_name, output_fname=None):
"""Use the prior distribution to generate batch_size number of samples
from the model.
LFADS generates a number of outputs for each sample, and these are all
- 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 plot_time_series
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_time_series(vals_bxtxn, bidx=None, n_to_plot=np.inf, scale=1.0,
Function _shake_shake_branch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _shake_shake_branch(x, output_filters, stride, rand_forward, rand_backward,
Function _summarize_vars_and_grads
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _summarize_vars_and_grads(grads_and_vars):
tf.logging.info('Trainable variables:')
tf.logging.info('-' * 60)
for grad, var in grads_and_vars:
tf.logging.info(var)
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def build(input_reader_config,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function generate_rnn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_rnn(rng, N, g, tau, dt, max_firing_rate):
Avoid deeply nested control flow statements. Open
if (is_test and dataset != 'test') or (is_validation and
not include_validation):
continue
Function _lm_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _lm_loss(self,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function run_synthetic
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def run_synthetic(main,
Function main
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def main(_):
runner_config = load_runner_config()
if FLAGS.output_dir:
tf.gfile.MakeDirs(FLAGS.output_dir)
- 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 _find_all_best_thresh
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _find_all_best_thresh(
Function get_data
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_data(dataset,