Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: __init__() got an unexpected keyword argument 'to_onehot_y' #60

Closed
Jingnan-Jia opened this issue Nov 9, 2020 · 3 comments
Closed

Comments

@Jingnan-Jia
Copy link
Contributor

Describe the bug
The code from A U-Net model for lung lesion segmentation from CT images could not be runned.

The error information is: TypeError: __init__() got an unexpected keyword argument 'to_onehot_y'.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/Project-MONAI/tutorials/tree/master/3d_segmentation/challenge_baseline/
  2. Install MONAI by pip install "git+https://github.com/Project-MONAI/MONAI#egg=monai[nibabel,ignite,tqdm]"
  3. Run commands python run_net.py train --data_folder "COVID-19-20_v2/Train" --model_folder "runs"

Expected behavior
Start training of the model.

Screenshots
image

Environment (please complete the following information):

  • OS: CentOS
  • Python version: 3.6
  • MONAI version [e.g. git commit hash]: 0.3.0
  • CUDA/cuDNN version:
  • GPU models and configuration

Additional context
https://covid-segmentation.grand-challenge.org/Resource/

@Nic-Ma
Copy link
Contributor

Nic-Ma commented Nov 9, 2020

Hi @Ordgod ,

This is a known issue, @yiheng-wang-nv is working on it to update all the tutorials and examples.
Please use the code under tag 0.3.0 instead of the master branch.

Thanks.

@wyli
Copy link
Contributor

wyli commented Nov 9, 2020

I'm currently working on a fix for the baseline. cc @yiheng-wang-nv @Nic-Ma (v0.3.0 won't work as we created a new network instance for it.)

@Nic-Ma
Copy link
Contributor

Nic-Ma commented Nov 9, 2020

I'm currently working on a fix for the baseline. cc @yiheng-wang-nv @Nic-Ma (v0.3.0 won't work as we created a new network instance for it.)

OK, I see. This is the new added tutorial.
@yiheng-wang-nv is already working on a PR #62 to update all the notebooks and examples, will finish it soon.

Thanks.

wyli added a commit to wyli/tutorials that referenced this issue Nov 9, 2020
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli wyli closed this as completed in db9d1dc Nov 9, 2020
boneseva pushed a commit to boneseva/MONAI-tutorials that referenced this issue Apr 21, 2024
* fixes Project-MONAI#60

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* update based on the comments

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants