facebookresearch / torchrec
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 79 files with 12,908 lines of code.
    • 0 very long files (0 lines of code)
    • 5 long files (3,368 lines of code)
    • 21 medium size files (6,268 lines of codeclsfd_ftr_w_mp_ins)
    • 14 small files (1,996 lines of code)
    • 39 very small files (1,276 lines of code)
0% | 26% | 48% | 15% | 9%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
py0% | 26% | 47% | 15% | 9%
cpp0% | 0% | 100% | 0% | 0%
h0% | 0% | 0% | 0% | 100%
MD0% | 0% | 0% | 0% | 100%
toml0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
torchrec/distributed0% | 28% | 55% | 9% | 5%
torchrec/sparse0% | 68% | 26% | 0% | 5%
torchrec/datasets0% | 0% | 62% | 14% | 23%
torchrec/optim0% | 0% | 61% | 24% | 14%
torchrec/modules0% | 0% | 25% | 32% | 41%
torchrec/models0% | 0% | 0% | 99% | <1%
torchrec/quant0% | 0% | 0% | 99% | <1%
torchrec/linter0% | 0% | 0% | 100% | 0%
ROOT0% | 0% | 0% | 0% | 100%
torchrec0% | 0% | 0% | 0% | 100%
torchrec/fx0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
jagged_tensor.py
in torchrec/sparse
819 71
embeddingbag.py
in torchrec/distributed
676 43
shard_estimators.py
in torchrec/distributed/planner
644 18
comm_ops.py
in torchrec/distributed
616 26
batched_embedding_kernel.py
in torchrec/distributed
613 44
twrw_sharding.py
in torchrec/distributed
422 22
embedding_lookup.py
in torchrec/distributed
415 24
dist_data.py
in torchrec/distributed
415 24
embedding_sharding.py
in torchrec/distributed
376 34
train_pipeline.py
in torchrec/distributed
359 21
tw_sharding.py
in torchrec/distributed
351 27
rw_sharding.py
in torchrec/distributed
325 21
model_parallel.py
in torchrec/distributed
319 23
criteo.py
in torchrec/datasets
314 15
jagged_tensor_ops.cpp
in torchrec/sparse
314 28
embedding_kernel.py
in torchrec/distributed
275 19
partitioners.py
in torchrec/distributed/planner
265 12
types.py
in torchrec/distributed
265 39
planners.py
in torchrec/distributed/planner
260 6
types.py
in torchrec/distributed/planner
251 29
keyed.py
in torchrec/optim
251 29
utils.py
in torchrec/datasets
230 25
crossnet.py
in torchrec/modules
222 8
embedding_types.py
in torchrec/distributed
217 29
enumerators.py
in torchrec/distributed/planner
213 8
stats.py
in torchrec/distributed/planner
209 4
embedding_modules.py
in torchrec/quant
197 11
dp_sharding.py
in torchrec/distributed
192 20
module_linter.py
in torchrec/linter
167 7
embedding_modules.py
in torchrec/modules
167 10
quant_embedding_kernel.py
in torchrec/distributed
159 8
quant_embeddingbag.py
in torchrec/distributed
155 11
cw_sharding.py
in torchrec/distributed
139 6
dlrm.py
in torchrec/models
134 10
random.py
in torchrec/datasets
127 6
deepfm.py
in torchrec/models
121 10
storage_reservations.py
in torchrec/distributed/planner
114 7
lazy_extension.py
in torchrec/modules
112 6
proposers.py
in torchrec/distributed/planner
111 9
warmup.py
in torchrec/optim
101 7
comm.py
in torchrec/distributed
90 6
grouped_position_weighted.py
in torchrec/distributed
84 6
movielens.py
in torchrec/datasets
81 5
mlp.py
in torchrec/modules
79 4
utils.py
in torchrec/distributed
77 7
utils.py
in torchrec/modules
77 6
embedding.py
in torchrec/distributed
75 7
criteo_dataframes.py
in torchrec/datasets/experimental
72 2
jagged_tensor_ops.h
in torchrec/sparse
62 -
embedding_configs.py
in torchrec/modules
56 3
Files With Most Units (Top 20)
File# lines# units
jagged_tensor.py
in torchrec/sparse
819 71
batched_embedding_kernel.py
in torchrec/distributed
613 44
embeddingbag.py
in torchrec/distributed
676 43
types.py
in torchrec/distributed
265 39
embedding_sharding.py
in torchrec/distributed
376 34
types.py
in torchrec/distributed/planner
251 29
embedding_types.py
in torchrec/distributed
217 29
keyed.py
in torchrec/optim
251 29
jagged_tensor_ops.cpp
in torchrec/sparse
314 28
tw_sharding.py
in torchrec/distributed
351 27
comm_ops.py
in torchrec/distributed
616 26
utils.py
in torchrec/datasets
230 25
embedding_lookup.py
in torchrec/distributed
415 24
dist_data.py
in torchrec/distributed
415 24
model_parallel.py
in torchrec/distributed
319 23
twrw_sharding.py
in torchrec/distributed
422 22
train_pipeline.py
in torchrec/distributed
359 21
rw_sharding.py
in torchrec/distributed
325 21
dp_sharding.py
in torchrec/distributed
192 20
embedding_kernel.py
in torchrec/distributed
275 19
Files With Long Lines (Top 4)

There are 4 files with lines longer than 120 characters. In total, there are 14 long lines.

File# lines# units# long lines
README.MD
in root
49 - 10
partitioners.py
in torchrec/distributed/planner
265 12 2
shard_estimators.py
in torchrec/distributed/planner
644 18 1
stats.py
in torchrec/distributed/planner
209 4 1