You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! As described here, pytorch lightning was renamed and the new package lightning.pytorch is not yet supported by Ray. I get the following error when trying to tune my neural net which uses the new lightning package:
ValueError: 'module_class' must be a subclass of 'pl.LightningModule'
This can be fixed by replacing import lightning.pytorch as pl by import pytorch_lightning as pl (and installing the correct package); however, other parts of my code depend on the new lightning package.
Versions / Dependencies
PyTorch Lightning 2.0.3
Lightning 2.0.3
Python 3.10.6
Ray 2.5.1
Reproduction script
import lightning.pytorch as pl
from ray.train.lightning import LightningConfigBuilder
class MyNet(pl.LightningModule):
def __init__(self) -> None:
super().__init__()
LightningConfigBuilder().module(cls=MyNet).build()
Issue Severity
Low: It annoys or frustrates me.
The text was updated successfully, but these errors were encountered:
pdr9908
added
bug
Something that is supposed to be working; but isn't
triage
Needs triage (eg: priority, bug/not-bug, and owning component)
labels
Jul 14, 2023
pdr9908
changed the title
[<Ray component: Core|RLlib|etc...>] Lightning not supported by Ray
[Tune] Lightning not supported
Jul 14, 2023
Hey @pdr9908 , thanks for surfacing this issue. Currently we are using namespace pytorch_lightning for backward compatibility with PTL1.x users. We'll consider including the new namespace lightning.pytorch for LightningTrainer.
woshiyyya
added
train
Ray Train Related Issue
enhancement
Request for new feature and/or capability
and removed
bug
Something that is supposed to be working; but isn't
triage
Needs triage (eg: priority, bug/not-bug, and owning component)
labels
Jul 17, 2023
What happened + What you expected to happen
Hello! As described here, pytorch lightning was renamed and the new package lightning.pytorch is not yet supported by Ray. I get the following error when trying to tune my neural net which uses the new lightning package:
ValueError: 'module_class' must be a subclass of 'pl.LightningModule'
This can be fixed by replacing
import lightning.pytorch as pl
byimport pytorch_lightning as pl
(and installing the correct package); however, other parts of my code depend on the new lightning package.Versions / Dependencies
PyTorch Lightning 2.0.3
Lightning 2.0.3
Python 3.10.6
Ray 2.5.1
Reproduction script
Issue Severity
Low: It annoys or frustrates me.
The text was updated successfully, but these errors were encountered: