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

PINA/tutorials/tutorial4 0.2 version #413

Open
ndem0 opened this issue Jan 22, 2025 · 0 comments
Open

PINA/tutorials/tutorial4 0.2 version #413

ndem0 opened this issue Jan 22, 2025 · 0 comments
Labels
v0.2 implementation in v0.2

Comments

@ndem0
Copy link
Member

ndem0 commented Jan 22, 2025

Traceback (most recent call last):
  File "/home/matte_b/PINA/tutorials/tutorial4/tutorial.py", line 517, in <module>
    trainer.train()
  File "/home/matte_b/PINA/pina/trainer.py", line 86, in train
    return super().fit(self.solver,
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/trainer/trainer.py", line 539, in fit
    call._call_and_handle_interrupt(
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/trainer/call.py", line 47, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
   File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/trainer/trainer.py", line 575, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/trainer/trainer.py", line 982, in _run
    results = self._run_stage()
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/trainer/trainer.py", line 1024, in _run_stage
    self._run_sanity_check()
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/trainer/trainer.py", line 1053, in _run_sanity_check
    val_loop.run()
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/loops/utilities.py", line 179, in _decorator
    return loop_run(self, *args, **kwargs)
   File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/loops/evaluation_loop.py", line 119, in run
    self.setup_data()
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/loops/evaluation_loop.py", line 175, in setup_data
    dataloaders = _request_dataloader(source)
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/trainer/connectors/data_connector.py", line 326, in _request_dataloader
    return data_source.dataloader()
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/trainer/connectors/data_connector.py", line 293, in dataloader
    return call._call_lightning_datamodule_hook(self.instance.trainer, self.name)
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/pytorch/trainer/call.py", line 193, in _call_lightning_datamodule_hook
    return fn(*args, **kwargs)
  File "/home/matte_b/PINA/pina/data/data_module.py", line 246, in val_dataloader
    sampler = PinaBatchSampler(self.val_dataset, batch_size, shuffle=False)
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/fabric/utilities/data.py", line 325, in wrapper
    init(obj, *args, **kwargs)
  File "/home/matte_b/PINA/pina/data/data_module.py", line 67, in __init__
    super().__init__(sampler=sampler, batch_size=batch_size,
  File "/home/matte_b/.local/lib/python3.12/site-packages/lightning/fabric/utilities/data.py", line 325, in wrapper
    init(obj, *args, **kwargs)
  File "/home/matte_b/.local/lib/python3.12/site-packages/torch/utils/data/sampler.py", line 323, in __init__
    raise ValueError(
ValueError: batch_size should be a positive integer value, but got batch_size=0

@dario-coscia dario-coscia changed the title PINA/tutorials/tutorial4 PINA/tutorials/tutorial4 0.2 version Jan 22, 2025
@ndem0 ndem0 added the v0.2 implementation in v0.2 label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v0.2 implementation in v0.2
Projects
None yet
Development

No branches or pull requests

1 participant