Function build
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def build(input_reader_config, batch_size=None, transform_input_data_fn=None,
input_context=None, reduce_to_frame_fn=None):
"""Builds a tf.data.Dataset.
Builds a tf.data.Dataset by applying the `transform_input_data_fn` on 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 read_dataset
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def read_dataset(file_read_func, input_files, config, filename_shard_fn=None):
"""Reads multiple datasets with sampling.
Args:
file_read_func: Function to use in tf_data.parallel_interleave, to read
- 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 _read_dataset_internal
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _read_dataset_internal(file_read_func,
Function build
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def build(input_reader_config, batch_size=None, transform_input_data_fn=None,
Function _read_dataset_internal
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _read_dataset_internal(file_read_func,
input_files,
num_readers,
config,
filename_shard_fn=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"