facebookresearch / pytext
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 321 files with 44,432 lines of code.
    • 2 very long files (3,493 lines of code)
    • 9 long files (5,635 lines of code)
    • 56 medium size files (16,515 lines of codeclsfd_ftr_w_mp_ins)
    • 78 small files (11,391 lines of code)
    • 176 very small files (7,398 lines of code)
7% | 12% | 37% | 25% | 16%
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
py7% | 12% | 37% | 25% | 16%
yml0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
pytext/data22% | 13% | 38% | 19% | 6%
pytext/torchscript44% | 0% | 16% | 27% | 11%
pytext/optimizer0% | 42% | 13% | 32% | 11%
pytext/config0% | 51% | 25% | 9% | 13%
pytext/metrics0% | 51% | 35% | 0% | 12%
pytext/models0% | 4% | 41% | 30% | 23%
pytext/trainers0% | 82% | 0% | 0% | 17%
pytext0% | 47% | 37% | 0% | 14%
pytext/metric_reporters0% | 0% | 64% | 28% | 7%
pytext/task0% | 0% | 67% | 25% | 6%
pytext/legacy0% | 0% | 33% | 43% | 22%
pytext/loss0% | 0% | 78% | 0% | 21%
pytext/common0% | 0% | 95% | 0% | 4%
pytext/fields0% | 0% | 42% | 32% | 25%
pytext/utils0% | 0% | 0% | 53% | 46%
pytext/exporters0% | 0% | 0% | 59% | 40%
ROOT0% | 0% | 0% | 0% | 100%
pytext/resources0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
tensorizers.py
in pytext/data
1787 190
module.py
in pytext/torchscript
1706 129
config_adapter.py
in pytext/config
981 94
__init__.py
in pytext/metrics
835 39
luna_attention.py
in pytext/models/representations/transformer
602 25
trainer.py
in pytext/trainers
562 23
data_handler.py
in pytext/data
555 38
main.py
in pytext
552 19
fp16_optimizer.py
in pytext/optimizer
534 61
annotation.py
in pytext/data/data_structures
508 62
sparsifier.py
in pytext/optimizer/sparsifiers
506 42
conv_decoder.py
in pytext/models/seq_models
475 21
doc_model.py
in pytext/models
462 24
roberta.py
in pytext/models
455 24
rnng_parser.py
in pytext/models/semantic_parsers/rnng
436 15
workflow.py
in pytext
436 21
loss.py
in pytext/loss
426 34
mask_generator.py
in pytext/models/seq_models
413 20
field.py
in pytext/legacy/data
393 19
squad_metric_reporter.py
in pytext/metric_reporters
390 20
luna_sentence_encoder.py
in pytext/models/representations/transformer
386 13
squad_for_bert_tensorizer.py
in pytext/data
384 22
new_task.py
in pytext/task
377 14
batchutils.py
in pytext/torchscript
354 25
mask_compositional.py
in pytext/metric_reporters
347 18
intent_slot_metrics.py
in pytext/metrics
340 20
tasks.py
in pytext/task
335 11
augmented_lstm.py
in pytext/models/representations
329 10
scheduler.py
in pytext/optimizer
324 38
rnn_decoder.py
in pytext/models/seq_models
321 14
conv_encoder.py
in pytext/models/seq_models
310 15
tsv.py
in pytext/data/sources
300 22
squad.py
in pytext/data/sources
294 12
constants.py
in pytext/common
289 2
utils.py
in pytext/data
285 26
token_tensorizer.py
in pytext/data
281 20
tokenizer.py
in pytext/data/tokenizers
280 30
field.py
in pytext/fields
274 21
multi_span_qa_metric_reporter.py
in pytext/metric_reporters
273 19
bert_classification_models.py
in pytext/models
272 15
utils.py
in pytext/torchscript
271 20
bert_tensorizer.py
in pytext/data
268 20
data.py
in pytext/data
259 17
squad_tensorizer.py
in pytext/data
257 13
pytext_config.py
in pytext/config
256 50
word_tagging_metric_reporter.py
in pytext/metric_reporters
251 27
squad_output_layer.py
in pytext/models/output_layers
245 8
mask_metrics.py
in pytext/metrics
243 6
regularized_loss.py
in pytext/loss
243 8
language_model_metric_reporter.py
in pytext/metric_reporters
243 21
Files With Most Units (Top 20)
File# lines# units
tensorizers.py
in pytext/data
1787 190
module.py
in pytext/torchscript
1706 129
config_adapter.py
in pytext/config
981 94
annotation.py
in pytext/data/data_structures
508 62
fp16_optimizer.py
in pytext/optimizer
534 61
pytext_config.py
in pytext/config
256 50
sparsifier.py
in pytext/optimizer/sparsifiers
506 42
__init__.py
in pytext/metrics
835 39
scheduler.py
in pytext/optimizer
324 38
data_handler.py
in pytext/data
555 38
data_source.py
in pytext/data/sources
218 35
loss.py
in pytext/loss
426 34
tokenizer.py
in pytext/data/tokenizers
280 30
word_tagging_metric_reporter.py
in pytext/metric_reporters
251 27
model.py
in pytext/models
216 26
utils.py
in pytext/data
285 26
batchutils.py
in pytext/torchscript
354 25
luna_attention.py
in pytext/models/representations/transformer
602 25
metric_reporter.py
in pytext/metric_reporters
202 25
tensorizer.py
in pytext/torchscript/tensorizer
180 24
Files With Long Lines (Top 5)

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

File# lines# units# long lines
batchutils.py
in pytext/torchscript
354 25 1
label.py
in pytext/utils
96 6 1
int_weighted_multi_category_embedding.py
in pytext/models/embeddings
126 4 1
attention.py
in pytext/models/seq_models
223 12 1
workflow.py
in pytext
436 21 1