Skip to content

Commit 7f152d4

Browse files
committed
apply rounding before calculating pareto front
1 parent 4f3fcd1 commit 7f152d4

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

docs/docs/features/searching.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Memory and execution time estimates were obtained without acceleration on a 7800
118118
| ViT-H-14__laion2b-s32b-b79k | 4676 | 39.06 | 82.36 ||
119119
| ViT-B-32-SigLIP2-256__webli | 3061 | 3.31 | 82.28 ||
120120
| ViT-B-16-SigLIP__webli | 1081 | 5.77 | 81.9 ||
121-
| ViT-B-16-SigLIP-256__webli | 1102 | 7.11 | 81.9 | |
121+
| ViT-B-16-SigLIP-256__webli | 1102 | 7.11 | 81.9 | |
122122
| ViT-L-14__laion2b-s32b-b82k | 2233 | 20.56 | 80.82 ||
123123
| nllb-clip-base-siglip__mrl | 4696 | 16.95 | 80.65 ||
124124
| nllb-clip-base-siglip__v1 | 4675 | 15.17 | 80.16 ||
@@ -423,7 +423,7 @@ Memory and execution time estimates were obtained without acceleration on a 7800
423423
| Model | Memory (MiB) | Execution Time (ms) | Recall (%) | Pareto Optimal |
424424
|------------------------------------------------------|--------------|---------------------|------------|----------------|
425425
| ViT-SO400M-16-SigLIP2-384__webli | 3854 | 56.57 | 86.5 ||
426-
| ViT-SO400M-16-SigLIP2-512__webli | 4050 | 107.67 | 86.5 | |
426+
| ViT-SO400M-16-SigLIP2-512__webli | 4050 | 107.67 | 86.5 | |
427427
| ViT-SO400M-14-SigLIP2-378__webli | 3940 | 72.25 | 86.39 ||
428428
| ViT-gopt-16-SigLIP2-384__webli | 6585 | 146.84 | 86.15 ||
429429
| ViT-H-14-378-quickgelu__dfn5b | 5049 | 108.4 | 86.1 ||
@@ -698,7 +698,7 @@ Memory and execution time estimates were obtained without acceleration on a 7800
698698
| ViT-B-16-SigLIP-512__webli | 1828 | 26.17 | 76.51 ||
699699
| ViT-B-16-SigLIP-384__webli | 1128 | 13.53 | 76.08 ||
700700
| ViT-B-16-SigLIP__webli | 1081 | 5.77 | 75.29 ||
701-
| ViT-B-16-SigLIP-256__webli | 1102 | 7.11 | 75.29 | |
701+
| ViT-B-16-SigLIP-256__webli | 1102 | 7.11 | 75.29 | |
702702
| ViT-SO400M-14-SigLIP-384__webli | 4417 | 72.19 | 74.84 ||
703703
| ViT-H-14__laion2b-s32b-b79k | 4676 | 39.06 | 56.32 ||
704704
| ViT-L-14__laion2b-s32b-b82k | 2233 | 20.56 | 47.25 ||

machine-learning/export/immich_model_exporter/parse_eval_data.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ def collapsed_table(language: str, df: pl.DataFrame) -> str:
7777
)
7878
eval_df = eval_df.with_columns(
7979
recall=(
80-
pl.col("image_retrieval_recall@1") + pl.col("image_retrieval_recall@5") + pl.col("image_retrieval_recall@10")
81-
)
82-
/ 3
83-
)
80+
(pl.col("image_retrieval_recall@1") + pl.col("image_retrieval_recall@5") + pl.col("image_retrieval_recall@10"))
81+
* (100 / 3)
82+
).round(2)
83+
).collect()
84+
eval_df.write_parquet("model_info.parquet")
8485

8586
pareto_front = eval_df.join_where(
8687
eval_df.select("language", "peak_rss", "exec_time_ms", "recall").rename(
@@ -103,14 +104,11 @@ def collapsed_table(language: str, df: pl.DataFrame) -> str:
103104
)
104105
eval_df = eval_df.join(pareto_front, on=["pretrained_model", "language"], how="left")
105106
eval_df = eval_df.with_columns(is_pareto=pl.col("recall_other").is_null())
106-
eval_df = (
107-
eval_df.drop("peak_rss_other", "exec_time_ms_other", "recall_other", "language_other")
108-
.unique(subset=["pretrained_model", "language"])
109-
.collect()
107+
eval_df = eval_df.drop("peak_rss_other", "exec_time_ms_other", "recall_other", "language_other").unique(
108+
subset=["pretrained_model", "language"]
110109
)
111-
eval_df.write_parquet("model_info.parquet")
112110

113-
eval_df = eval_df.filter(pl.col("recall") >= 0.2)
111+
eval_df = eval_df.filter(pl.col("recall") >= 20)
114112
eval_df = eval_df.select(
115113
pl.col("pretrained_model").alias("Model"),
116114
(pl.col("peak_rss") / 1024).round().cast(pl.UInt32).alias("Memory (MiB)"),
@@ -119,7 +117,7 @@ def collapsed_table(language: str, df: pl.DataFrame) -> str:
119117
# pl.col("image_retrieval_recall@1").mul(100).round(2).alias("Recall@1 (%)"),
120118
# pl.col("image_retrieval_recall@5").mul(100).round(2).alias("Recall@5 (%)"),
121119
# pl.col("image_retrieval_recall@10").mul(100).round(2).alias("Recall@10 (%)"),
122-
pl.col("recall").mul(100).round(2).alias("Recall (%)"),
120+
pl.col("recall").alias("Recall (%)"),
123121
pl.when("is_pareto").then(pl.lit("✅")).otherwise(pl.lit("❌")).alias("Pareto Optimal"),
124122
)
125123
eval_df = eval_df.sort("Recall (%)", "Memory (MiB)", descending=[True, False])

0 commit comments

Comments
 (0)