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

The Plans_handler.py does not match the original repo. #62

Open
Strawbili opened this issue Oct 20, 2024 · 5 comments
Open

The Plans_handler.py does not match the original repo. #62

Strawbili opened this issue Oct 20, 2024 · 5 comments

Comments

@Strawbili
Copy link

When I'm trying your models on other Dataset, I found the configManager went something wrong. There might be errors like AttributeError: 'ConfigurationManager' object has no attribute 'conv_kernel_sizes'. Did you mean: 'pool_op_kernel_sizes'?
I'm using the offical-generated nnUNet Plans Manager and I found your Plans Manager doesn't match the official ones. Did you modified the Plans_handler.py while you are coding? Why did you do this?

@wyd2
Copy link

wyd2 commented Nov 1, 2024

I have the same problem. How can I solve it?

@Strawbili
Copy link
Author

I've solved this problem by revise the code in the plans_handler.py.
To be more specific, please print/debug a variable called PlansManager.
Then alter the api as the structures in the PlansManager.
The name of those keys may vary a little bit from the original one:(

@Strawbili
Copy link
Author

Strawbili commented Nov 5, 2024

And I modified the code again, here are some hints below.
For instance, the modification of the code should be from:

    def conv_kernel_sizes(self) -> List[List[int]]:
        return self.configuration['conv_kernel_sizes']

to

    def conv_kernel_sizes(self) -> List[List[int]]:
        return self.configuration['architecture']['arch_kwargs']['kernel_sizes']

plz print the plans_manager variable in the function get_umamba_enc_2d_from_plans in the file umamba/nnunetv2/nets/UMambaEnc_2d.py

@wyd2
Copy link

wyd2 commented Nov 5, 2024

Thank you so much for sharing your experience. However, I found that the error was caused by the incorrect version of nnunet. We should compile nnunet first to process the data, so that the generated plan.json is correct.

@hjj194
Copy link

hjj194 commented Nov 25, 2024

I think the issue is that you're using nnUNet's plans and preprocess instead of UMamba's. This is likely because of some previous nnUNet setup that’s still active. Make sure you initialize the UMamba environment variables correctly. Also, you can use pip list to check which version of nnUNet is currently installed in your environment.

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