You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#5865
### Description
A few sentences describing the changes proposed in this pull request.
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.
Signed-off-by: Suraj Pai <bspai@bwh.harvard.edu>
Describe the bug
MONAI bundle instantiate fails when
_target_
containspath
attributeThe following error is thrown,
To Reproduce
I created a dataset.py file with the following
and run the following code which throws an error
Error message:
Expected behavior
The dataset object should be instantiated.
Additional context
Seems like the issue is here:
MONAI/monai/utils/module.py
Line 217 in 734d4ff
where the instantiate uses has a
path
attribute itself, causing the duplication whenpath
is passed inkwargs
as well.Since
path
is a very common attribute used in datasets, it might be prudent to change the name of this argument to a non-conflicting nameEnvironment
Ensuring you use the relevant python executable, please paste the output of:
The text was updated successfully, but these errors were encountered: