Skip to content

Commit 14abc4e

Browse files
committed
fix(models): correct --all flag logic to build both models
Fix bug where --all flag only built CodeT5, not MiniLM. Issue: The BUILD_MINILM condition excluded --all from the logic: BUILD_MINILM = args.includes('--minilm') || (\!args.includes('--codet5') && \!args.includes('--all')) When --all was passed, this evaluated to false because: false || (true && false) = false Fix: Explicitly include --all in both conditions: BUILD_MINILM = args.includes('--all') || args.includes('--minilm') || \!args.includes('--codet5') BUILD_CODET5 = args.includes('--all') || args.includes('--codet5') Now the behavior is correct: - No flags: MiniLM only (default) - --minilm: MiniLM only - --codet5: CodeT5 only - --all: Both MiniLM and CodeT5
1 parent f434195 commit 14abc4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/models/scripts/build.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ const CLEAN_BUILD = args.includes('--clean')
5454
const NO_SELF_UPDATE = args.includes('--no-self-update')
5555

5656
// Model selection flags.
57-
const BUILD_MINILM = args.includes('--minilm') || (!args.includes('--codet5') && !args.includes('--all'))
58-
const BUILD_CODET5 = args.includes('--codet5') || args.includes('--all')
57+
const BUILD_MINILM = args.includes('--all') || args.includes('--minilm') || !args.includes('--codet5')
58+
const BUILD_CODET5 = args.includes('--all') || args.includes('--codet5')
5959

6060
// Quantization level (default: INT4 for maximum compression).
6161
const QUANT_LEVEL = args.includes('--int8') ? 'INT8' : 'INT4'

0 commit comments

Comments
 (0)