Skip to content

fix: resolve production text analysis model loading - #27

Merged
hrx01-dev merged 3 commits into
mainfrom
fix/text-analysis-torch-runtime
Aug 27, 2026
Merged

hrx01-dev merged 3 commits into
mainfrom
fix/text-analysis-torch-runtime

Conversation

@hrx01-dev

Copy link
Copy Markdown
Owner

Problem

Production /api/analyze/text reaches the backend successfully, but inference returns 503 Service Unavailable because the Hugging Face text model cannot be loaded.

Root cause

Render is installing torch==2.2.2+cpu. The installed Transformers runtime rejects loading the model checkpoint because torch.load requires PyTorch >= 2.6 unless the checkpoint uses safetensors.

Render logs confirm:
ValueError: Due to a serious vulnerability issue in torch.load ... require users to upgrade torch to at least v2.6

Fix

  • Upgrade CPU PyTorch from 2.2.2 to 2.6.0.
  • Upgrade CPU torchvision from 0.17.2 to the matching 0.21.0 release.

This keeps the existing trained-model implementation intact and fixes the runtime dependency that prevents text analysis from executing.

@vercel

vercel Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
veritas-ai Error Error Aug 27, 2026 12:56pm

@hrx01-dev
hrx01-dev merged commit 21c8cc1 into main Aug 27, 2026
2 of 3 checks passed

This branch had an error being deployed

1 failed deployment
Preview — 07ea1381 Deployed Aug 27, 2026 by vercel[bot]
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