When setting lightning strategy to "fsdp" pytorch_lightning.strategies.FSDPStrategy.
model.forward() converts the returned NDict to a simple dictionary, which causes to few issues.
This PR, convert it back to NDict if the returned type is not as expected.
When setting lightning strategy to "fsdp" pytorch_lightning.strategies.FSDPStrategy. model.forward() converts the returned NDict to a simple dictionary, which causes to few issues. This PR, convert it back to NDict if the returned type is not as expected.