Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Expand ONNX export test coverage beyond UNet and SegResNet

Chiusa
#9,072 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
75/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, pytorch

Direzione di ricerca

Inizia da tests/networks/test_convert_to_onnx.py e segui il pattern di esportazione ONNX parametrizzato già presente. Aggiungi la copertura esclusivamente CPU per le dieci architetture di rete indicate, usando configurazioni ridotte e input minimi, con BasicUNetPlusPlus configurato con deep_supervision=False. Il lavoro è completato quando ogni modello elencato viene esportato correttamente senza aumentare sostanzialmente il tempo di esecuzione della CI.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The current ONNX export test suite (tests/networks/test_convert_to_onnx.py) only covers 2 out of 40+ network architectures: UNet (2D) and SegResNet (3D). This means regressions in ONNX exportability for widely used architectures like DynUNet, UNETR, VNet, DenseNet, ResNet, etc. go completely undetected until a user hits them in production.

The convert_to_onnx() utility is a key part of MONAI's deployment story, and the gap between supported networks and tested networks is significant.

Describing the solution

Add parameterized ONNX export tests for additional architectures that are known to export cleanly. Starting with these 10 LOW-risk networks that have no ONNX-incompatible patterns (no .item(), no data-dependent control flow, single-tensor output):

  1. DynUNet — popular for nnU-Net style pipelines
  2. AttentionUnet — standard attention-gated U-Net
  3. BasicUNet — simple baseline U-Net
  4. BasicUNetPlusPlus — UNet++ (with deep_supervision=False)
  5. VNet — classic 3D segmentation
  6. HighResNet — standard 3D segmentation
  7. DenseNet — classification backbone
  8. ResNet — classification backbone
  9. SENet — squeeze-excitation network
  10. UNETR — transformer-based segmentation

All tests will use small model configurations and tiny input tensors to keep CI runtime low, following the existing parameterized pattern in the test file.

Describe alternatives

  • Testing all 40+ networks at once — impractical due to ONNX-incompatible patterns in some architectures (e.g., SwinUNETR uses .item() during init, AHNet has data-dependent control flow). Better to start with the safe subset and expand incrementally.

Additional context

The existing FIXME at line 29 of test_convert_to_onnx.py notes that CUDA produces different outputs vs ONNX — all tests run CPU-only, which is fine for verifying exportability.

Lingua principale
Python
Stelle
8.7k
Fork
1.6k
Merge medio
5g 20h
PR unite (30g)
12

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Project-MONAI/MONAI

Tutte le issue di Project-MONAI/MONAI

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.