chore: Restructure

# Conflicts:
#	config/measure.py
#	results/compression_results_auto_small.csv
This commit is contained in:
Tibo De Peuter 2025-12-18 11:18:39 +01:00
parent dd938489ef
commit 2f869a8a7a
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
41 changed files with 8 additions and 21 deletions

View file

@ -65,12 +65,12 @@ if __name__ == "__main__":
]
models = [
("auto-genome-full-256.pt", 256, "autoencoder", files_genome + files_genome_cnn),
("auto-genome-full-128.pt", 128, "autoencoder", files_genome + files_genome_cnn),
("auto-genome-full-256.pt", 256, "autoencoder", files_genome),
("auto-genome-full-128.pt", 128, "autoencoder", files_genome),
("cnn-genome-full-256.pt", 256, "cnn", files_genome_cnn),
("cnn-genome-full-128.pt", 128, "cnn", files_genome_cnn),
("auto-enwik9-full-256.pt", 256, "autoencoder", files_enwik9 + files_enwik9_cnn),
("auto-enwik9-full-128.pt", 128, "autoencoder", files_enwik9 + files_enwik9_cnn),
("auto-enwik9-full-256.pt", 256, "autoencoder", files_enwik9),
("auto-enwik9-full-128.pt", 128, "autoencoder", files_enwik9),
("cnn-enwik9-full-256.pt", 256, "cnn", files_enwik9_cnn),
("cnn-enwik9-full-128.pt", 128, "cnn", files_enwik9_cnn),
]

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

View file

@ -9,7 +9,7 @@ dependencies = [
"fsspec==2024.9.0",
"lorem>=0.1.1",
"arithmeticencodingpython",
"pandas-stubs~=2.3.3",
"pandas-stubs==2.3.3.251201",
"seaborn>=0.13.2",
]

View file

@ -1,13 +0,0 @@
model_type,model_name,context_length,dataset_type,input_file_name,original_file_size,compressed_file_size,mse_loss,compression_time,decompression_time
autoencoder,auto-genome-full-256.pt,256,genome,genome_small.fna,1367,1392,220.29188537597656,237708436,29378622
autoencoder,auto-genome-full-256.pt,256,genome,genome_xsmall.fna,1043,1160,263.97027587890625,5293080,4488761
autoencoder,auto-genome-full-256.pt,256,genome,genome_xxsmall.fna,800,928,319.5350036621094,4873340,4381310
autoencoder,auto-genome-full-128.pt,128,genome,genome_small.fna,1367,2816,120.52304077148438,251659317,5284661
autoencoder,auto-genome-full-128.pt,128,genome,genome_xsmall.fna,1043,2304,133.8379669189453,152590538,4432469
autoencoder,auto-genome-full-128.pt,128,genome,genome_xxsmall.fna,800,1792,159.2862548828125,153622653,4532139
autoencoder,auto-enwik9-full-256.pt,256,enwik9,text_small.txt,1022,976,746.8033447265625,6699780,22065927
autoencoder,auto-enwik9-full-256.pt,256,enwik9,text_xsmall.txt,825,976,787.5345458984375,3715750,3665629
autoencoder,auto-enwik9-full-256.pt,256,enwik9,text_xxsmall.txt,492,488,828.8658447265625,4892560,4176979
autoencoder,auto-enwik9-full-128.pt,128,enwik9,text_small.txt,1022,2016,231.42955017089844,5005880,4400159
autoencoder,auto-enwik9-full-128.pt,128,enwik9,text_xsmall.txt,825,1764,236.55636596679688,5024449,4180100
autoencoder,auto-enwik9-full-128.pt,128,enwik9,text_xxsmall.txt,492,1008,237.20529174804688,4856779,4145850
1 model_type model_name context_length dataset_type input_file_name original_file_size compressed_file_size mse_loss compression_time decompression_time
2 autoencoder auto-genome-full-256.pt 256 genome genome_small.fna 1367 1392 220.29188537597656 237708436 29378622
3 autoencoder auto-genome-full-256.pt 256 genome genome_xsmall.fna 1043 1160 263.97027587890625 5293080 4488761
4 autoencoder auto-genome-full-256.pt 256 genome genome_xxsmall.fna 800 928 319.5350036621094 4873340 4381310
5 autoencoder auto-genome-full-128.pt 128 genome genome_small.fna 1367 2816 120.52304077148438 251659317 5284661
6 autoencoder auto-genome-full-128.pt 128 genome genome_xsmall.fna 1043 2304 133.8379669189453 152590538 4432469
7 autoencoder auto-genome-full-128.pt 128 genome genome_xxsmall.fna 800 1792 159.2862548828125 153622653 4532139
8 autoencoder auto-enwik9-full-256.pt 256 enwik9 text_small.txt 1022 976 746.8033447265625 6699780 22065927
9 autoencoder auto-enwik9-full-256.pt 256 enwik9 text_xsmall.txt 825 976 787.5345458984375 3715750 3665629
10 autoencoder auto-enwik9-full-256.pt 256 enwik9 text_xxsmall.txt 492 488 828.8658447265625 4892560 4176979
11 autoencoder auto-enwik9-full-128.pt 128 enwik9 text_small.txt 1022 2016 231.42955017089844 5005880 4400159
12 autoencoder auto-enwik9-full-128.pt 128 enwik9 text_xsmall.txt 825 1764 236.55636596679688 5024449 4180100
13 autoencoder auto-enwik9-full-128.pt 128 enwik9 text_xxsmall.txt 492 1008 237.20529174804688 4856779 4145850

View file

@ -110,5 +110,5 @@ def plot_compression_metrics(csv_path, output_dir="results/compress/plots"):
if __name__ == "__main__":
# You can modify this path to point to your CSV file
csv_path = "results/compress/compression_metrics_20251216_182603.csv"
csv_path = "compression_metrics_20251216_182603.csv"
plot_compression_metrics(csv_path)

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 289 KiB

After

Width:  |  Height:  |  Size: 289 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 278 KiB

After

Width:  |  Height:  |  Size: 278 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 278 KiB

After

Width:  |  Height:  |  Size: 278 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 143 KiB

Before After
Before After

View file

@ -5,7 +5,7 @@ import numpy as np
if __name__ == "__main__":
# read in the csv
df = pd.read_csv("./results/compress/compression_results.csv")
df = pd.read_csv("compression_results.csv")
for dataset_type in df["dataset_type"].unique():
for model_type in df["model_type"].unique():

2
uv.lock generated
View file

@ -1761,7 +1761,7 @@ requires-dist = [
{ name = "matplotlib", marker = "extra == 'dev'", specifier = ">=3.10.7" },
{ name = "memray", marker = "extra == 'dev'", specifier = ">=1.19.1" },
{ name = "optuna", marker = "extra == 'dev'", specifier = "==4.5.0" },
{ name = "pandas-stubs", specifier = "~=2.3.3" },
{ name = "pandas-stubs", specifier = "==2.3.3.251201" },
{ name = "regex", marker = "extra == 'dataset'", specifier = ">=2025.11.3" },
{ name = "seaborn", specifier = ">=0.13.2" },
{ name = "torch", marker = "extra == 'dev'", specifier = "==2.9.0" },