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

Issue with [ def validation_epoch_end(self, outputs): ] #15

Open
Wadha-Almattar opened this issue May 24, 2023 · 1 comment
Open

Issue with [ def validation_epoch_end(self, outputs): ] #15

Wadha-Almattar opened this issue May 24, 2023 · 1 comment

Comments

@Wadha-Almattar
Copy link

Hi there, I'm trying to re-produce the work. Unfortunately, I'm getting this issue each time I run the code:

TypeError: SelfSupervisedMethod.on_validation_epoch_end() missing 1 required positional argument: 'outputs'

I've seek the issue but could't find a proper solution!
It seems that on_validation_epoch_end() mentioned in the error ---> with [on] , receives only one argument
but as we're not using it in the code, still it's called somewhere from the lighting package ?

Any suggestions would be appreciated,

Thanks,

@Tieck-IT
Copy link

Tieck-IT commented Jun 8, 2023

I encountered the same issue. This is my solution using a small trick.

def validation_step(self, batch, batch_idx):

        self.outputs = {"emb": emb, "labels": class_labels}

        
def on_validation_epoch_end(self):

        outputs = self.outputs

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

2 participants