pytorch / data
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 118 units with 863 lines of code in units (58.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (51 lines of code)
    • 13 simple units (239 lines of code)
    • 103 very simple units (573 lines of code)
0% | 0% | 5% | 27% | 66%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 5% | 27% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
torchdata/datapipes/iter/util0% | 0% | 8% | 29% | 62%
torchdata/datapipes/iter/load0% | 0% | 0% | 24% | 75%
torchdata/datapipes/utils0% | 0% | 0% | 100% | 0%
torchdata/datapipes/iter/transform0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __iter__()
in torchdata/datapipes/iter/util/hashchecker.py
26 12 1
def __new__()
in torchdata/datapipes/iter/util/cacheholder.py
25 11 7
def __iter__()
in torchdata/datapipes/iter/util/rows2columnar.py
15 10 1
def __iter__()
in torchdata/datapipes/iter/util/combining.py
31 10 1
def _get_response_from_google_drive()
in torchdata/datapipes/iter/load/online.py
25 10 3
def __iter__()
in torchdata/datapipes/iter/util/samplemultiplexer.py
18 9 1
def _cache_check_fn()
in torchdata/datapipes/iter/util/cacheholder.py
14 9 5
def __iter__()
in torchdata/datapipes/iter/util/paragraphaggregator.py
18 8 1
def __iter__()
in torchdata/datapipes/iter/load/fsspec.py
20 8 1
def __iter__()
in torchdata/datapipes/iter/util/ziparchivereader.py
18 7 1
def _detect_compression_type()
in torchdata/datapipes/iter/util/extractor.py
21 7 2
def __iter__()
in torchdata/datapipes/iter/util/cacheholder.py
19 7 1
def __len__()
in torchdata/datapipes/iter/util/samplemultiplexer.py
10 6 1
def __iter__()
in torchdata/datapipes/iter/util/tararchivereader.py
18 6 1
def validate_pathname_binary_tuple()
in torchdata/datapipes/utils/common.py
12 6 2
def _recursive_search()
in torchdata/datapipes/iter/util/cacheholder.py
9 5 1
def _get_response_from_http()
in torchdata/datapipes/iter/load/online.py
14 5 3
13 4 0
def strip_newline()
in torchdata/datapipes/iter/util/plain_text_reader.py
9 4 3
def decode()
in torchdata/datapipes/iter/util/plain_text_reader.py
6 4 3