Open josemonsalve2 opened 1 year ago
I have same issue!
After I change my pytorch_lightning==1.9.5, then 'BatchSampler' error occurs. Last part of the error message is as follows.
In call to configurable 'run' (<function run at 0x7f7fb3ef59d0>)
dataloader = _update_dataloader(dataloader, sampler, mode=mode)
File "/compuworks/anaconda3/envs/nerf_factory/lib/python3.9/site-packages/pytorch_lightning/utilities/data.py", line 157, in _update_dataloader
dl_args, dl_kwargs = _get_dataloader_init_args_and_kwargs(dataloader, sampler, mode)
File "/compuworks/anaconda3/envs/nerf_factory/lib/python3.9/site-packages/pytorch_lightning/utilities/data.py", line 218, in _get_dataloader_init_args_and_kwargs
dl_kwargs.update(_dataloader_init_kwargs_resolve_sampler(dataloader, sampler, mode, disallow_batch_sampler))
File "/compuworks/anaconda3/envs/nerf_factory/lib/python3.9/site-packages/pytorch_lightning/utilities/data.py", line 342, in _dataloader_init_kwargs_resolve_sampler
raise MisconfigurationException(
lightning_fabric.utilities.exceptions.MisconfigurationException: We tried to re-instantiate your custom batch sampler and failed. To mitigate this, either follow the API of `BatchSampler` or instantiate your custom batch sampler inside `*_dataloader` hooks of your module.
In call to configurable 'run' (<function run at 0x7f66310e29d0>)
Did you solved??
I have encountered the same problem before, until I installed Pytorch_ Righting=1.6.0, this issue has been resolved.
Hi,
I am having issues running this project. I suspect it's an issue with the version of pytorch_lightning.
Here's the output:
System:
I'm running on a Mac studio with MacOS Ventura 13.3.1.
Here are the versions installed by pip -r requirements.txt:
Similar problems found in:
https://github.com/Lightning-AI/lightning/issues/17191
That hints to this migration guide:
https://lightning.ai/docs/pytorch/stable/upgrade/migration_guide.html
Possible temporary solution
Use
pytorch_lightning==1.9.5
in requirements.txt