Project-MONAI / Project-MONAI/model-zoo

ImportError: 'IgniteInfo' from 'monai.utils' and Compatibility Issues with MONAI v1.4.0+ during Inference

Open
#714 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
338
Forks
106
PR merge metrics
No merged PRs in 30d

Description

Discussed in https://github.com/Project-MONAI/model-zoo/discussions/713

Originally posted by rifshu November 14, 2024
I'm encountering multiple issues when running inference using the MONAI bundle on a custom pipeline that includes RetinaNet-based object detection for 3D medical imaging (LUNA16 dataset). The issues seem to be related to the recent updates in MONAI (v1.4.0 and above). Below are the details:

ImportError for IgniteInfo:
When attempting to run inference using the MONAI bundle (python -m monai.bundle run --config_file configs/inference.json), I receive the following error:

ImportError: cannot import name 'IgniteInfo' from 'monai.utils'

Expected Behavior:
The inference pipeline should run without errors using the pre-trained model and process the LUNA16 dataset to generate predictions.

Actual Behavior:
The pipeline fails to run due to IgniteInfo import errors, version incompatibilities with itkreader, and multiple deprecation warnings.

What I've Tried:
Updated all related packages (torch, pytorch-ignite, itk).
changes in inference file:

  1. "whether_raw_luna16": true
  2. "dataset_dir": "..../subset0",
    Request for Help:
    I am relatively new to MONAI and would greatly appreciate a step-by-step guide on how to properly use a pre-trained model from MONAI to run inference on a dataset that I have stored locally on my system. Any guidance on setting up the configuration files, loading the model, and executing the inference pipeline would be incredibly helpful.

Thank you in advance for your assistance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with configs/inference.json and the command python -m monai.bundle run --config_file configs/inference.json; reproduce the IgniteInfo import failure with the reported MONAI v1.4.0+ environment. Check the MONAI, pytorch-ignite, itkreader, and ITK compatibility involved, and consider the work done when the pretrained RetinaNet pipeline processes the local LUNA16 dataset without the reported errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.