Skip to content

clin_mr_FVM release asset extracts with an extra top-level folder #238

Description

@LalithShiyam

Summary

The clin_mr_FVM_30032026.zip release asset extracts one directory level deeper than the layout expected by moosez.models.Model, causing clin_mr_FVM to fail after download even though the asset contains valid nnUNet weights.

Affected asset

Expected layout

moosez expects model folders directly under models/nnunet_trained_models, matching other assets such as clin_ct_organs:

models/nnunet_trained_models/Dataset501_FVM/
  nnUNetTrainer__nnUNetResEncUNetPlans_40G__3d_fullres/
  model_version.json

Actual layout after download

The FVM asset currently extracts as:

models/nnunet_trained_models/Dataset501_FVM/
  model_version.json

models/nnunet_trained_models/clin_mr_FVM/Dataset501_FVM/
  nnUNetTrainer__nnUNetResEncUNetPlans_40G__3d_fullres/

Because Dataset501_FVM/model_version.json matches the expected URL, subsequent runs treat the model as cached, then fail while looking for an nnUNet configuration folder.

Error

ValueError: No valid configuration folders found in .../models/nnunet_trained_models/Dataset501_FVM

Verification

After moving:

models/nnunet_trained_models/clin_mr_FVM/Dataset501_FVM/nnUNetTrainer__nnUNetResEncUNetPlans_40G__3d_fullres

into:

models/nnunet_trained_models/Dataset501_FVM/

the model loads successfully:

directory= .../nnunet_trained_models/Dataset501_FVM
configuration_directory= .../Dataset501_FVM/nnUNetTrainer__nnUNetResEncUNetPlans_40G__3d_fullres
folds= ('all',)
expectation= (['MR'], ['MR_'])
labels= {0: 'background', 1: 'structure'}
training= 34

The nnUNet predictor also initializes successfully from the corrected folder on CPU.

Suggested fix

Repackage and replace the release asset with the same filename, but with Dataset501_FVM/ at the zip root, matching the layout used by other MOOSE model assets. This should preserve the existing URL used by released moosez versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions