Repository navigation
2.26.5
2.26.5 (2026-10-17)
Fix
-
fix: make nAUC independent of the order of equally confident queries (#5660)
-
fix: make nAUC independent of the order of equally confident queries
nauc sorts the confidences with a stable argsort and keeps the suffix of
round(rate * n) entries. When a cutoff lands inside a group of equal
confidences, which members survive depends on their input order, so the same
data in a different order gives a different nAUC. With four equal confidences
and metrics [0, 0, 1, 1] one order gives 1.0 and the reverse gives -1.0.
Give every member of an exactly equal confidence group that group's mean
metric, so the retained suffix is the score expected under random
tie-breaking. Cutoffs, rates and the rounded retention counts are unchanged,
and the transformation is the identity when there are no exact ties.
-
fix: keep nauc returning nan for an empty input
-
test: reduce the nAUC tie-order regression to one case
The five cases asserted the same property from different angles. One test on a constant
confidence vector covers it: before the fix the same two vectors scored 1.0 and
-1.0000000000000002 depending on which queries came first, and after it both are 0.0.
Reviewed-by: KennethEnevoldsen
- fix: return an array for an empty input in abstention_curve
abstention_curve is declared to return an array of length len(abstention_rates) and its result is passed straight to sklearn.metrics.auc, so returning a float made nauc raise InvalidParameterError for an empty input instead of returning nan as before. (37b801f)
-
fix: add VideoFramesWrapper to run image models on video tasks (#5537)
-
feat: add VideoFramesWrapper to run image models on video tasks
Image-text models like CLIP are usually reported on video benchmarks by
sampling frames uniformly, encoding each frame as an image and mean-pooling.
The wrapper makes that protocol explicit and records num_frames and pooling
in experiment_kwargs, so results stay distinguishable from native video models.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- feat: run image models on video tasks automatically in evaluate
mteb.evaluate now wraps a model in VideoFramesWrapper per task when the
task needs video and the model only supports images, so no explicit wrapper
or ModelMeta change is needed. The frame count is exposed as
video_frames on evaluate and --video-frames on the CLI; when unset, the
default of 8 is used with a warning so it is always a deliberate choice.
The wrapper now keeps its own ModelMeta copy instead of mutating the
wrapped model, which keeps image-task results in the same run unaffected.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- test: skip video wrapper tests when video dependencies are missing
The module imported datasets.Video at collection time, which does not exist
on the lowest-pin CI (datasets<4.0). Guard with importorskip like the other
video tests and import Video and torchvision inside the test that uses them.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- refactor: rename to Video2ImagesWrapper and expose fps/max_frames
Review feedback: the name now says what the wrapper does, frame sampling
supports the same fixed-count or fps modes as the native video models
(recorded in experiment_kwargs), and tqdm comes from tqdm.auto.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- refactor: move image-to-video wrapping out of evaluate.py
evaluate.py now only calls wrap_image_model_for_video once per task; the
modality check, default-frames warning, model loading and wrapping live
next to Video2ImagesWrapper. Behaviour is unchanged.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- feat: store default-protocol video results for image models as regular results
Results with the default 8 uniform frames are now saved next to the model's
other results so they reach the leaderboard; any other sampling is recorded
in experiment_kwargs and stored under experiments/, matching how loader
overrides on native video models are handled.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- fix: check the cache before loading an image model for a video task
wrap_image_model_for_video loaded the model itself, and ran before
_check_cache, so an image model was downloaded and loaded for every
video task even when results were already cached — and even under
overwrite_strategy="only-cache", which is documented not to run the
task at all.
Split it into video2images_frames_for_task (pure, resolves the frame
count) and wrap_image_model_for_video (wraps an already-loaded model).
evaluate now derives the recorded meta with video2images_model_meta
before the cache check and wraps only after the existing lazy load.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- fix: only wrap dense image models for video tasks
The wrapper and the relaxed _check_model_modalities keyed off
modalities alone, so every image model without video was now accepted
on video tasks — 51 of them are not dense: 43 late-interaction, 6
cross-encoder, 2 sparse. Before this branch they were rejected with a
clear modality error.
They cannot work: cross-encoders (the LightOn-rerank-* family) expose
predict but no encode/similarity, and late-interaction models emit
per-token embeddings padded per batch, so torch.stack raises across
batches and silently mean-pools padding within a single batch.
Gate the wrapping, the modality relaxation and Video2ImagesWrapper
itself on "dense" in meta.model_type. Every image model in the
registry declares a model type, so this excludes exactly those 51.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- fix: reject models that already support video in Video2ImagesWrapper
evaluate never wraps a native video model, but __init__ only checked
for image and dense, so one could still be wrapped by hand. That would
replace the model's native video path with mean-pooled frames and, at
the default frame count, store the result as its regular video results.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- fix: only treat video as covered when it is alone in a dataloader
_check_model_modalities added video to the model's modalities for
every task, so tasks that mix video with other inputs on one retrieval
side passed the upfront check and then hit the wrapper's
NotImplementedError. XModBenchVT2TReranking (query video+text) went
from a partial-overlap warning to a crash; CoVRRVT2VRetrieval and
VCDBCoreAudioVideoRetrieval went from being rejected outright to
loading the model first.
Video now counts as covered only when a retrieval side is video-only,
and video2images_frames_for_task applies the same rule so these tasks
are not wrapped. Non-retrieval tasks keep the old check: they encode
each modality in its own dataloader (zeroshot classification encodes
text labels separately from the videos), so their metadata is a union
across calls rather than one dataloader's features.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- fix: register granite-vision embedding as late-interaction
ibm-granite/granite-vision-3.3-2b-embedding declared
model_type=["dense"] while padding multi-vector output with
pad_sequence and scoring it with score_multi_vector, so it passed the
dense gate added for video frame pooling and would have failed the same
way colpali does.
It is the only model in the registry that scored MaxSim while claiming
to be dense; test_max_sim_models_are_not_registered_as_dense keeps it
that way, since the mismatch breaks anything keying off model_type,
not just the video wrapper.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- refactor: make Video2ImagesWrapper an explicit opt-in, drop autowrap
mteb.evaluate no longer wraps image models for video tasks, and the
--video-frames flag and video_frames argument are removed. Evaluating an
image model on a video task now fails with an error pointing to
Video2ImagesWrapper; tasks that only partially overlap still warn, so
image-only evaluation stays possible.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- fix: address review comments on Video2ImagesWrapper
- only hint at the wrapper for dense image models that do not support video
- reject tasks mixing video with other modalities upfront for wrapped models
- explicit
show_progress_barparameter, forwarded to the wrapped model - encode frames as BMP bytes instead of PNG, much cheaper and lossless
- hoist non-torch imports, stop exporting
DEFAULT_NUM_FRAMES - tests for the hint conditions, upfront rejection, mixed-input error and progress bar
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- fix: only hint at the wrapper when it would run the task, check torchvision upfront
- the modality-error hint now appears only when adding video to the model's
modalities passes the check and no retrieval side mixes video with another
modality, sharing_has_mixed_video_sidewith the upfront rejection - Video2ImagesWrapper raises a clear ImportError at construction when
torchvision is missing, and the docs ask formteb[image,video] - tests check the hint against every video task and the missing dependency
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- fix: drop the redundant torchvision check in Video2ImagesWrapper
mteb.get_model already requires the image extra for image models, so the
check never helps real models. Reword the docs to say so.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- refactor: move the video-only rule into the wrapper, always record frame sampling
- Video2ImagesWrapper owns the mixed-video-side rule, the hint text and a
validate_taskshook; evaluate only calls the hook if the model has one - CachedEmbeddingWrapper forwards
validate_tasks, so cache-wrapped models
are also rejected upfront instead of failing mid-run - the sampling is always recorded in experiment_kwargs, so image models on
video are stored as experiments and stay distinguishable from native video
models
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- refactor: cache frame embeddings by nesting the cache inside the wrapper
CachedEmbeddingWrapper cannot hash video items, so forwarding validate_tasks
through it only served an ordering that cannot run video. Restore the cache
wrapper, test and document Video2ImagesWrapper(CachedEmbeddingWrapper(model)).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- style: format the docs code block
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- refactor: address review comments on evaluate and the video docs
Drop _as_task_list and with_video_hint in favour of inline expressions,
tighten the docs intro and opt-in wording, and remove the CLI note, the
partial-overlap paragraph and the Limitations section.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- fix: reject mixed video inputs for every task type in Video2ImagesWrapper
The check only looked at retrieval query/document sides. It now derives
the modalities that share one input from the task category for other task
types too, so video with audio in classification or pair classification is
caught by validate_tasks. Also link the related docs pages.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- docs: fold the frame-embedding cache section into a collapsed note
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- test: use the content-hash helpers after the random baseline refactor
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- refactor: flag video-only models in ModelMeta and check tasks from metadata
Replace the duck-typed validate_tasks hook in evaluate with a non-serialized
ModelMeta.video_only_inputs flag set by Video2ImagesWrapper. The existing
modality check now rejects tasks that mix video with another modality in one
input, from the model and task metadata alone, before any data or model work.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- docs: drop the experiment_kwargs paragraph from the video wrapper page
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- refactor: detect video-wrapped models from experiment_kwargs, drop the ModelMeta field
The wrapper already records video_frame_pooling in experiment_kwargs, so
_check_model_modalities recognises wrapped models from that instead of a new
ModelMeta attribute that only this wrapper would use.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- docs: link model papers and fold provenance into the intro; drop DEFAULT_NUM_FRAMES
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> (fe6b2f1)
Unknown
- tests: write the citation cache as indented JSON (#5685)
fix: write the citation cache as indented JSON
refaudit writes the cache on one line, so every cache update was a single
unreadable line in the diff. Re-dump it after each flush with the same
layout as the pretty-format-json hook.