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

ModelCore.calc_criterion is not callable when running on multi-GPUs with torch.nn.DataParallel #679

Open
1 of 2 tasks
WenjieDu opened this issue Mar 25, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@WenjieDu
Copy link
Owner

1. System Info

pypots v0.13

2. Information

  • The official example scripts
  • My own created scripts

3. Reproduction

Call calc_criterion() when the model is running on multiple GPUs

def calc_criterion(self, inputs: dict) -> dict:

4. Expected behavior

It fails because the model is wrapped in DataParallel, which only provides forward() for parallel running.

5. Your contribution

PR is on the way

@WenjieDu WenjieDu added the bug Something isn't working label Mar 25, 2025
@WenjieDu WenjieDu self-assigned this Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant