• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

galthran-wq / clip-web-service
78%

Build:
DEFAULT BRANCH: master
Repo Added 25 Mar 2026 03:12PM UTC
Token n6CUYaFyO7Vfv5EGEbWQ29sETsGeAQv7W regen
Build 10 Last
Files 11
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • feat/clip-classify-endpoint
  • feat/gpu-support
  • master
  • refactor/drop-onnx-clip-hf-direct

18 May 2026 02:03PM UTC coverage: 78.355% (-10.9%) from 89.247%
26038482344

push

github

web-flow
refactor: drop onnx-clip, load CLIP ONNX directly from HuggingFace (#3)

* refactor: drop onnx-clip, load CLIP ONNX directly from HuggingFace

The onnx-clip package downloaded its ONNX checkpoint from an S3 bucket
that has since expired, breaking startup. Replace it with direct loading
from openai/clip-vit-base-patch32 on HuggingFace Hub, pinned to commit
12b36594d.

- pyproject.toml: drop onnx-clip; add onnxruntime, huggingface-hub,
  tokenizers, pillow, numpy as direct dependencies.
- src/services/clip_service.py: rewrite to use onnxruntime.InferenceSession
  on the combined model.onnx (reads logits_per_image directly), with
  CLIP-specific image preprocessing (bicubic shorter-side resize +
  center crop + CLIP mean/std) and the standalone tokenizers library
  for prompts. Public API (CLIPService.__init__/decode_image/classify)
  and HTTP /classify/batch shape are unchanged.
- src/config.py: add CLIP_MODEL_REPO, CLIP_MODEL_REVISION,
  CLIP_ONNX_FILENAME, CLIP_TOKENIZER_FILENAME knobs.
- Dockerfile, Dockerfile.gpu: pre-pull the ONNX and tokenizer into
  HF_HOME=/app/.hf_cache at build time and set HF_HUB_OFFLINE=1 at
  runtime, so the service never reaches the network at startup.
- CLAUDE.md: refresh architecture description + config table.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(clip): restore batch_size chunking + clarify HF cache constraint

Review noted that the rewrite silently dropped the chunking semantics
of OnnxClip(batch_size=...) — all images were run in a single
session.run, which spikes GPU/CPU memory at CLIP_MAX_BATCH_SIZE=64.

Restore the original behavior: classify() now loops session.run over
image chunks of size batch_size, concatenates the per-chunk
logits_per_image, then applies softmax. Verified that chunked and
single-shot results match exactly (7 images at batch_size=3 → 3
session.run calls → identical probabilities to a 1-image call).

Also clarify in CLAUDE.m... (continued)

16 of 51 new or added lines in 2 files covered. (31.37%)

1 existing line in 1 file now uncovered.

181 of 231 relevant lines covered (78.35%)

0.78 hits per line

Relevant lines Covered
Build:
Build:
231 RELEVANT LINES 181 COVERED LINES
0.78 HITS PER LINE
Source Files on master
  • Tree
  • List 11
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
26038482344 master refactor: drop onnx-clip, load CLIP ONNX directly from HuggingFace (#3) * refactor: drop onnx-clip, load CLIP ONNX directly from HuggingFace The onnx-clip package downloaded its ONNX checkpoint from an S3 bucket that has since expired, breaking ... push 18 May 2026 02:04PM UTC web-flow github
78.35
26038453051 refactor/drop-onnx-clip-hf-direct Merge 67911529a into 73a795e34 Pull #3 18 May 2026 02:03PM UTC web-flow github
78.35
26038266363 refactor/drop-onnx-clip-hf-direct Merge 917076c66 into 73a795e34 Pull #3 18 May 2026 02:00PM UTC web-flow github
79.39
23587672099 master fix push 26 Mar 2026 09:44AM UTC galthran-wq github
89.25
23551707052 master Add GPU support via Dockerfile.gpu with onnxruntime-gpu (#2) Separate Dockerfile.gpu with nvidia/cuda:12.4.1 base image that swaps onnxruntime for onnxruntime-gpu. No code changes — onnx_clip auto-detects CUDAExecutionProvider via ort.get_availab... push 25 Mar 2026 04:20PM UTC web-flow github
89.25
23551693323 feat/gpu-support Merge f42caffa2 into ceda6d198 Pull #2 25 Mar 2026 04:20PM UTC web-flow github
89.25
23550511119 master Add CLIP zero-shot classification endpoint (#1) * Add CLIP zero-shot classification endpoint using onnx_clip Replace template placeholder with a working CLIP inference service. Uses onnx_clip (ONNX Runtime) instead of PyTorch for lightweight CPU... push 25 Mar 2026 03:55PM UTC web-flow github
89.25
23550477255 feat/clip-classify-endpoint Merge 26661488c into ee582d5d3 Pull #1 25 Mar 2026 03:54PM UTC web-flow github
89.25
23549940110 feat/clip-classify-endpoint Merge 37e99367b into ee582d5d3 Pull #1 25 Mar 2026 03:43PM UTC web-flow github
90.16
23548386542 master Initial commit push 25 Mar 2026 03:12PM UTC web-flow github
90.91
See All Builds (10)

Badge your Repo: clip-web-service

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc