From 3e7169387fe50e7ca891a681520d85e2487af5fe Mon Sep 17 00:00:00 2001 From: Michael Platzer Date: Wed, 7 Jan 2026 10:44:48 +0100 Subject: [PATCH 1/2] perf: simplify embedding heuristics --- mostlyai/engine/_tabular/argn.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mostlyai/engine/_tabular/argn.py b/mostlyai/engine/_tabular/argn.py index b26d8a89..8f06e63f 100644 --- a/mostlyai/engine/_tabular/argn.py +++ b/mostlyai/engine/_tabular/argn.py @@ -1,4 +1,4 @@ -# Copyright 2025 MOSTLY AI +# Copyright 2025-2026 MOSTLY AI # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -117,9 +117,9 @@ def _embedding_heuristic(id: str, model_size: ModelSizeOrUnits, dim_input: int) if isinstance(model_size, dict): return model_size[id] model_size_output_dim = dict( - S=max(10, int(2 * np.ceil(dim_input**0.15))), - M=max(10, int(3 * np.ceil(dim_input**0.25))), - L=max(10, int(4 * np.ceil(dim_input**0.33))), + S=int(2 * np.ceil(dim_input**0.15)), + M=int(3 * np.ceil(dim_input**0.25)), + L=int(4 * np.ceil(dim_input**0.33)), ) return min(dim_input, model_size_output_dim[model_size]) From 216a3fa4220908ec5b4fc06e2e5e21bba9d1250c Mon Sep 17 00:00:00 2001 From: Michael Platzer Date: Wed, 7 Jan 2026 11:24:21 +0100 Subject: [PATCH 2/2] merge main --- .pre-commit-config.yaml | 2 +- mostlyai/engine/_tabular/argn.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6cfca422..52dd13fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: # - --remove-header - --license-filepath - LICENSE_HEADER - - --use-current-year + # - --use-current-year - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: diff --git a/mostlyai/engine/_tabular/argn.py b/mostlyai/engine/_tabular/argn.py index 8f06e63f..f29a36a9 100644 --- a/mostlyai/engine/_tabular/argn.py +++ b/mostlyai/engine/_tabular/argn.py @@ -1,4 +1,4 @@ -# Copyright 2025-2026 MOSTLY AI +# Copyright 2025 MOSTLY AI # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.