tensorflow/python/data/ops/dataset_ops.py
File dataset_ops.py
has 4052 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Function bucket_by_sequence_length
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def bucket_by_sequence_length(
Function __init__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(self, variant_tensor):
"""Creates a DatasetV2 object.
This is a difference between DatasetV1 and DatasetV2. DatasetV1 does not
take anything in its constructor whereas in the DatasetV2, we expect
- 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 interleave
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def interleave(
Function interleave
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def interleave(
Function padded_batch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def padded_batch(self,
Function group_by_window
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def group_by_window(
Function window
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def window(
Function from_generator
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def from_generator(generator,
Function rejection_resample
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def rejection_resample(
Function batch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def batch(
Function window
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def window(
Function from_generator
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def from_generator(
Function snapshot
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def snapshot(
Function batch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def batch(self,
Function padded_batch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def padded_batch(
Function _filter_ds
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _filter_ds(dataset,
Function shuffle
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def shuffle(
Function load
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def load(
Function shuffle
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def shuffle(self,
Function ragged_batch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ragged_batch(
Function map
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def map(self,
Function map
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def map(
Function save
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def save(self,
Function _estimate_initial_dist_ds
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _estimate_initial_dist_ds(target_dist_t,
Function sample_from_datasets
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def sample_from_datasets(