Repository: graphnet-team/graphnet
Issue: batch_size = 1 throws error with poor description.

**Describe the bug**
Running the example training script with batch size = 1 gives the error message seen below at the sanity checking stage.

**To Reproduce**
Steps to reproduce the behavior:
1. Change batch size to 1 in 01_train_model.py 
1. Run the 01_train_model.py script

**Expected behavior**
Training with batch size = 1 (i.e. no batching)

**Full traceback**
```
Sanity Checking: 0it [00:00, ?it/s]Traceback (most recent call last):
  File "/cvmfs/icecube.opensciencegrid.org/py3-v4.1.0/RHEL_7_x86_64/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/cvmfs/icecube.opensciencegrid.org/py3-v4.1.0/RHEL_7_x86_64/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/misc/home/aske/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
    cli.main()
  File "/misc/home/aske/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
    run()
  File "/misc/home/aske/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/misc/home/aske/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 322, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/misc/home/aske/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 136, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/misc/home/aske/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
  File "/disk20/users/aske/graphnet/examples/04_training/01_train_model.py", line 179, in <module>
    args.suffix,
  File "/disk20/users/aske/graphnet/examples/04_training/01_train_model.py", line 101, in main
    **config.fit,
  File "/misc/disk20/users/aske/graphnet/src/graphnet/models/model.py", line 107, in fit
    self, train_dataloader, val_dataloader, ckpt_path=ckpt_path
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 697, in fit
    self._fit_impl, model, train_dataloaders, val_dataloaders, datamodule, ckpt_path
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 648, in _call_and_handle_interrupt
    return self.strategy.launcher.launch(trainer_fn, *args, trainer=self, **kwargs)
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/strategies/launchers/subprocess_script.py", line 93, in launch
    return function(*args, **kwargs)
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 735, in _fit_impl
    results = self._run(model, ckpt_path=self.ckpt_path)
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1166, in _run
    results = self._run_stage()
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1252, in _run_stage
    return self._run_train()
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1274, in _run_train
    self._run_sanity_check()
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1336, in _run_sanity_check
    val_loop._reload_evaluation_dataloaders()
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 237, in _reload_evaluation_dataloaders
    self.trainer.reset_val_dataloader()
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1933, in reset_val_dataloader
    RunningStage.VALIDATING, model=pl_module
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 385, in _reset_eval_dataloader
    dataloaders = [self._prepare_dataloader(dl, mode=mode) for dl in dataloaders if dl is not None]
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 385, in <listcomp>
    dataloaders = [self._prepare_dataloader(dl, mode=mode) for dl in dataloaders if dl is not None]
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 296, in _prepare_dataloader
    dataloader = _update_dataloader(dataloader, sampler, mode=mode)
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/utilities/data.py", line 203, in _update_dataloader
    dataloader = _reinstantiate_wrapped_cls(dataloader, *dl_args, **dl_kwargs)
  File "/misc/home/aske/IG/lib/python3.7/site-packages/pytorch_lightning/utilities/data.py", line 448, in _reinstantiate_wrapped_cls
    result = constructor(*args, **kwargs)
TypeError: __init__() missing 1 required positional argument: 'batch_size'
```

**Additional context**
It seems that batch size = False or batch_size = None automatically predicts a (possibly) suitable batch size as running with batch_size = 12 will give you 64 steps in the training step but running with False/None will give you 7 steps. 


Changed files:
src/graphnet/data/dataloader.py

diff --git a/src/graphnet/data/dataloader.py b/src/graphnet/data/dataloader.py
index 4e8538c9..b199f586 100644
--- a/src/graphnet/data/dataloader.py
+++ b/src/graphnet/data/dataloader.py
@@ -29,8 +29,8 @@ class DataLoader(torch.utils.data.DataLoader):
     def __init__(
         self,
         dataset: Dataset,
-        batch_size: int,
-        shuffle: bool,
+        batch_size: int = 1,
+        shuffle: bool = False,
         num_workers: int = 10,
         persistent_workers: bool = True,
         collate_fn: Callable = collate_fn,
@@ -53,7 +53,6 @@ class DataLoader(torch.utils.data.DataLoader):
     def from_dataset_config(
         cls,
         config: DatasetConfig,
-        batch_size: int,
         **kwargs: Any,
     ) -> Union["DataLoader", Dict[str, "DataLoader"]]:
         """Construct `DataLoader`s based on selections in `DatasetConfig`."""
@@ -69,7 +68,6 @@ class DataLoader(torch.utils.data.DataLoader):
             for name, dataset in datasets.items():
                 data_loaders[name] = cls(
                     dataset,
-                    batch_size=batch_size,
                     shuffle=do_shuffle(name),
                     **kwargs,
                 )
@@ -83,4 +81,4 @@ class DataLoader(torch.utils.data.DataLoader):
             )
             dataset = Dataset.from_config(config)
             assert isinstance(dataset, Dataset)
-            return cls(dataset, batch_size=batch_size, **kwargs)
+            return cls(dataset, **kwargs)