Showing 11,634 of 11,634 total issues
Function configure_cluster
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def configure_cluster(worker_hosts=None, task_index=-1):
"""Set multi-worker cluster spec in TF_CONFIG environment variable.
Args:
worker_hosts: comma-separated list of worker ip:port pairs.
- 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 image_info_to_feature_dict
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def image_info_to_feature_dict(height, width, filename, image_id,
Function test_binary_sliced_metric
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def test_binary_sliced_metric(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function get_distribution_strategy
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_distribution_strategy(distribution_strategy="mirrored",
Function test_power_linear_lr_schedule
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def test_power_linear_lr_schedule(self, init_lr, power, linear_decay_fraction,
Function _download_and_clean
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _download_and_clean(dataset, data_dir):
"""Download MovieLens dataset in a standard format.
This function downloads the specified MovieLens format and coerces it into a
standard format. The only difference between the ml-1m and ml-20m datasets
- 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 write_tf_record_dataset
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def write_tf_record_dataset(output_path, annotation_iterator,
Function process
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def process(self, element):
elem_list = element.split(args.csv_delimeter)
out_list = []
for i, val in enumerate(elem_list):
if i > 0 and i <= NUM_NUMERIC_FEATURES:
- 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 assertLayerSavable
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def assertLayerSavable(
Function get_inference_signatures
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_inference_signatures(self, function_keys: Dict[Text, Text]):
"""Gets defined function signatures.
Args:
function_keys: A dictionary with keys as the function to create signature
- 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 __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function _get_estimator_spec_with_metrics
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_estimator_spec_with_metrics(logits: tf.Tensor,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
multi_task: multitask.MultiTask,
multi_task_model: Union[tf_keras.Model,
base_model.MultiTaskBaseModel],
optimizer: tf.optimizers.Optimizer,
- 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 test_metric_computes_correct_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def test_metric_computes_correct_loss(