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

Training Error for run_seg_scannet.py #1

Open
YoungbeomYoo opened this issue Mar 20, 2024 · 2 comments
Open

Training Error for run_seg_scannet.py #1

YoungbeomYoo opened this issue Mar 20, 2024 · 2 comments

Comments

@YoungbeomYoo
Copy link

Hi, I'm trying to reproduce your scannet segmentation code following your README directions.
But the RuntimeError came out.

RuntimeError: Expected to mark a variable ready only once. This error is caused by one of the following reasons: 1) Use of a module parameter outside the forward function. Please make sure model parameters are not shared across multiple concurrent forward-backward passes. or try to use _set_static_graph() as a workaround if this module graph does not change during training loop.2) Reused parameters in multiple reentrant backward passes. For example, if you use multiple checkpoint functions to wrap the same part of your model, it would result in the same set of parameters been used by different reentrant backward passes multiple times, and hence marking a variable ready multiple times. DDP does not support such use cases in default. You can try to use _set_static_graph() as a workaround if your module graph does not change over iterations.
Parameter at index 611 with name backbone.layers.3.blocks.1.mamba.proj.bias has been marked as ready twice. This means that multiple autograd engine hooks have fired for this particular parameter during this iteration.

How to solve this problem?
(I changed seg_scannet.yaml conifg file's MODEL: find_unused_parameters: True)

@Aristo23333
Copy link
Collaborator

Hi, I'm trying to reproduce your scannet segmentation code following your README directions. But the RuntimeError came out.

RuntimeError: Expected to mark a variable ready only once. This error is caused by one of the following reasons: 1) Use of a module parameter outside the forward function. Please make sure model parameters are not shared across multiple concurrent forward-backward passes. or try to use _set_static_graph() as a workaround if this module graph does not change during training loop.2) Reused parameters in multiple reentrant backward passes. For example, if you use multiple checkpoint functions to wrap the same part of your model, it would result in the same set of parameters been used by different reentrant backward passes multiple times, and hence marking a variable ready multiple times. DDP does not support such use cases in default. You can try to use _set_static_graph() as a workaround if your module graph does not change over iterations. Parameter at index 611 with name backbone.layers.3.blocks.1.mamba.proj.bias has been marked as ready twice. This means that multiple autograd engine hooks have fired for this particular parameter during this iteration.

How to solve this problem? (I changed seg_scannet.yaml conifg file's MODEL: find_unused_parameters: True)

Hello, thank you very much for your interest in our project. I noticed that you mentioned that you changed a parameter: find_unused_parameters: True, which is a parameter inherited from our baseline code that I didn't change in the actual experiment, I'm not sure if it's a bug caused by this change. You can try to modify back to my settings for experimentation, if there are other questions, you can also provide you with detailed modifications, we will discuss it again, thank you.

@USTCLH
Copy link

USTCLH commented Apr 6, 2024

Hello, you can try to change return input_ids to return self.forward_features(input_ids, inference_params) in code to solve this problem

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