File Complexity Overall
  • There are 48 files with units, with 8,558 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 0 complex files (McCabe index sum 126-250; 0 lines of code)
    • 13 medium complex files (McCabe index sum 51-125; 4,364 lines of code)
    • 11 slightly complex files (McCabe index sum 26-50; 2,411 lines of code)
    • 24 simple files (McCabe index sum 1-25; 1,783 lines of code)
  • 11 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 50% | 28% | 20%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
py0% | 0% | 50% | 28% | 20%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
src0% | 0% | 51% | 28% | 19%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 48)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
data.py
in src/training
425 39 119 28 28
train.py
in src/training
305 7 113 37 80
__main__.py
in src/training
490 5 107 22 93
text_negatives_data.py
in src/training
295 23 97 33 14
transformer.py
in src/open_clip
644 38 94 15 9
zero_shot.py
in src/training
349 23 77 22 14
data_utils.py
in src/training
299 28 74 25 15
aro_datasets.py
in src/training
262 20 72 27 27
factory.py
in src/open_clip
420 15 69 16 18
spacy_parser.py
in src/training
161 3 65 40 59
loss.py
in src/open_clip
315 25 64 20 11
hydra.py
in src/training
175 6 56 32 24
video_datasets.py
in src/training
224 24 56 25 8
tokenizer.py
in src/open_clip
173 12 49 28 12
transform.py
in src/open_clip
358 23 47 13 12
clip_model.py
in src/open_clip
218 18 44 20 11
collate.py
in src/training
78 9 42 54 13
model.py
in src/open_clip
301 16 39 13 7
utils.py
in src/training
83 10 35 42 10
pretrained.py
in src/open_clip
480 15 35 7 9
distributed.py
in src/training
106 9 32 30 8
profiler.py
in src/training
194 9 29 15 11
coca_model.py
in src/open_clip
370 12 28 8 10
video_reader.py
in src/training
50 10 26 52 9
hf_model.py
in src/open_clip
198 13 25 13 8
modified_resnet.py
in src/open_clip
134 11 25 19 5
utils.py
in src/open_clip
80 7 24 30 8
file_utils.py
in src/training
62 6 22 35 8
big_vision.py
in src/open_clip
119 1 22 18 22
push_to_hf_hub.py
in src/open_clip
267 5 22 8 17
params.py
in src/training
250 4 20 8 12
timm_model.py
in src/open_clip
142 6 20 14 12
video_utils.py
in src/training
25 3 12 48 7
scheduler.py
in src/training
51 6 12 24 4
62 2 10 16 7
41 2 10 24 6
frame_sampler.py
in src/training
47 5 10 21 4
pos_embed.py
in src/open_clip
47 4 10 21 6
s3_utils.py
in src/training
53 4 7 13 3
iter_utils.py
in src/open_clip
17 3 7 41 3
metric_utils.py
in src/training
30 2 6 20 5
12 2 6 50 3
14 1 5 36 5
decode_utils.py
in src/training
17 4 5 29 2
precision.py
in src/open_clip
14 1 5 36 5
29 3 4 14 2
logger.py
in src/training
21 1 4 19 4
openai.py
in src/open_clip
51 2 2 4 1
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...