Skip to content

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

@WenjieDu

Description

@WenjieDu

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions