---
title: "2026-08-31 ve2e minimal ISUP inference class"
description: "Implemented the user-provided ISUP inference class skeleton around current model-ready MRI inputs."
image: "https://docs.virdx.dev/img/virdx-social-card.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.virdx.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 2026-08-31 ve2e minimal ISUP inference class

## Work Done

- Implemented only the functions already defined in `src/ve2e/inference/isup.py`; no helper functions were added.
- Confirmed the current DinoFlex volume contract still uses `t2`, `dwi_b1400`, and `adc`, each shaped `(B, D, H, W)` before channel stacking.
- Added input-shape checks, model-contract validation, canonical class-logit conversion, ISUP argmax prediction, and maximum softmax confidence.
- Reused the existing ClearML EMA loader and `to_class_logits` production primitive.
- Passed Ruff, formatting, compilation, complexity checks, and a mocked end-to-end class test.
- Appended and pushed commit `019bf781` to `feat/isup-inference`.

## Lessons Learned: Pitfalls

- The input skeleton contained an explicit uncertainty comment. Treating its fields as fixed without first checking current schemas caused avoidable user frustration.
- The configured default model still cannot be deserialized by the current code because its pickle references the removed `SelfAttnConcatLinear` class; class implementation does not change that artifact incompatibility.

## Lessons Learned: Improvements

- Resolve explicit TODO questions against current production schemas before implementing around them.
- Keep inference inputs explicitly documented as model-ready when the class does not own resampling, cropping, or normalization.

Source: https://docs.virdx.dev/knowledge/inbox/2026-08-31-clinical-ve2e-minimal-isup-inference-class/index.mdx
