Skip to content

Fail lmlite-models when a model has no ONNX weights - #14

Merged
decitre merged 1 commit into
mainfrom
fix-weightless-models
Nov 4, 2026
Merged

decitre merged 1 commit into
mainfrom
fix-weightless-models

Conversation

@decitre

@decitre decitre commented Nov 4, 2026

Copy link
Copy Markdown
Owner

lmlite-models exited 0 and listed a model in manifest.json even when none of its ONNX weights were copied: missing weights, or symlinks, which model_files() skipped without a warning. The browser then loaded the model from the site only and failed at run time.

model_files() now copies symlinks that point to files inside the model directory, skips and names the others, and raises when a model has no ONNX weights. This applies to both --format files and --format zip.

lmlite-models exited 0 and listed a model in manifest.json even when none
of its ONNX weights were copied: missing weights, or symlinks, which
model_files() skipped without a warning. The browser then loaded the model
from the site only and failed at run time.

model_files() now copies symlinks that point to files inside the model
directory, skips and names the others, and raises when a model has no ONNX
weights. This applies to both --format files and --format zip.
@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.05%. Comparing base (30f1d9a) to head (446dbed).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
+ Coverage   82.96%   83.05%   +0.08%     
==========================================
  Files           8        8              
  Lines        2472     2478       +6     
==========================================
+ Hits         2051     2058       +7     
+ Misses        421      420       -1     
Flag Coverage Δ
javascript 79.19% <ø> (ø)
python 87.97% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/lmlite/model_assets.py 91.75% <100.00%> (+0.84%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@decitre
decitre merged commit e21b4bb into main Nov 4, 2026
8 checks passed
@decitre
decitre deleted the fix-weightless-models branch November 4, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant