Skip to content

fix(model_loader): drop deprecated resume_download kwarg#2053

Open
romanbsd wants to merge 1 commit into
unclecode:developfrom
romanbsd:fix/model-loader-resume-download
Open

fix(model_loader): drop deprecated resume_download kwarg#2053
romanbsd wants to merge 1 commit into
unclecode:developfrom
romanbsd:fix/model-loader-resume-download

Conversation

@romanbsd

@romanbsd romanbsd commented Jul 4, 2026

Copy link
Copy Markdown

Summary

Split out of #2046 as the first of three focused PRs, per @ntohidi's review request.

Recent transformers releases removed the resume_download argument from from_pretrained, so passing resume_download=None raises a TypeError. This drops the deprecated kwarg from the three model loaders and adds unit tests that assert the loaders call from_pretrained with the current API (no resume_download).

Changes

  • crawl4ai/model_loader.py — remove resume_download=None from load_bert_base_uncased, load_HF_embedding_model, load_text_multilabel_classifier
  • tests/unit/test_model_loader_transformers.py — new tests (mock transformers, no network/model download)

Testing

pytest tests/unit/test_model_loader_transformers.py — 3 passed.

Follow-ups from the same review: dependency bumps are in two separate PRs (minor/patch, and major).

🤖 Generated with Claude Code

…etrained

Recent transformers releases removed the `resume_download` argument from
`from_pretrained`, so passing `resume_download=None` raises a TypeError.
Use the default API and add unit tests covering the three loaders.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@romanbsd romanbsd mentioned this pull request Jul 4, 2026
6 tasks
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