Add `dict` properties to Engine and State
Open
Nobody has claimed this yet.
needs-discussion
question
- Dominant language
- Python
- Stars
- 4.8k
- Forks
- 726
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 5
Description
🚀 Feature
Hi @vfdev-5 ,
In the current implementation of MONAI handlers, they are deeply coupled with ignite engine.
Some users that use different workflows can't leverage our handlers, so we are trying to make handlers decouple from ignite.
We discussed the problem and got some basic ideas:
- Add
dictproperties to theengine, then handlers can treatenginearg as a regular dict with same structure as ignite Engine object. - Pass the event name when trigger handler, so other workflows also can call this handler with the same event name.
For example:
class TestHandler:
def attach(self):
# ignite specific logic
... ...
def __call__(self, data: Dict, event: str):
# data map to the engine dict of ignite
if event == "ITERATION_COMPLETED":
self._iteration(data)
if event == "EPOCH_COMPLETED":
self._epoch(data)
What do you think?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files or tests; start by reviewing the MONAI handlers and the Ignite Engine and State interfaces they currently depend on. Define the required dict-like data and event-passing behavior, then verify that handlers can be called from workflows that do not use Ignite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100