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

Fabric example trainer fails with validation #19992

Closed
liambsmith opened this issue Jun 18, 2024 · 0 comments · Fixed by #19993
Closed

Fabric example trainer fails with validation #19992

liambsmith opened this issue Jun 18, 2024 · 0 comments · Fixed by #19993
Labels
bug Something isn't working needs triage Waiting to be triaged by maintainers ver: 2.2.x

Comments

@liambsmith
Copy link
Contributor

liambsmith commented Jun 18, 2024

Bug description

Using the example fabric trainer with validation would result in:

AttributeError: Your LightningModule code tried to access self.trainer.model but this attribute is not available when using Fabric with a LightningModule.

Which would occur during validation when 'on_validation_model_eval' and 'on_validation_model_train' were called, as they do not work with fabric.

What version are you seeing the problem on?

master

How to reproduce the bug

No response

Error messages and logs

# AttributeError: Your LightningModule code tried to access `self.trainer.model` but this attribute is not available when using Fabric with a LightningModule.

Environment

Current environment
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow):
#- PyTorch Lightning Version (e.g., 1.5.0):
#- Lightning App Version (e.g., 0.5.2):
#- PyTorch Version (e.g., 2.0):
#- Python version (e.g., 3.9):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):
#- Running environment of LightningApp (e.g. local, cloud):

More info

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Waiting to be triaged by maintainers ver: 2.2.x
Projects
None yet
1 participant