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
Hi,
From #3233, I understand that the current error message for auto_scale_batch_size misconfiguration message dates back from a time where LightningDataModule did not exist. The message is still the same today: "Field {self._batch_arg_name} not found in both model and model.hparams". Typically "Field batch_size..."
This message is misleading. I thought that I needed to add a batch_size attribute to my model because the tuning would be independent of data module or something.
How to fix
I’m new to lightning so I’m not sure how to phrase this (that’s why I’m opening an issue instead of a PR). How about: f"Field {self._batch_arg_name} not found in {model.__class__.__name__}, datamodule.__class__.__name__, nor their hparams attributes." ?
The text was updated successfully, but these errors were encountered:
@PaulLerner Your proposal seems fine to me. Let's go for the simple solution first, which should already be an improvement and we can think of ways to make it even better.
Would you be interested to work on it?
Yes I can open a PR!
While I’m at it, maybe I should also update the docstring of Trainer. It states, for auto_scale_batch_size: "The result will be stored in self.batch_size in the LightningModule" but it is actually done with lightning_setattr. So the correct doc should state: "The result will be stored in self.batch_size in the LightningModule or LightningDataModule depending on your setup." ?
PaulLerner
added a commit
to PaulLerner/lightning
that referenced
this issue
Oct 27, 2022
📚 Documentation
The issue
Hi,
From #3233, I understand that the current error message for
auto_scale_batch_size
misconfiguration message dates back from a time whereLightningDataModule
did not exist. The message is still the same today: "Field {self._batch_arg_name} not found in bothmodel
andmodel.hparams
". Typically "Field batch_size..."This message is misleading. I thought that I needed to add a
batch_size
attribute to my model because the tuning would be independent of data module or something.How to fix
I’m new to lightning so I’m not sure how to phrase this (that’s why I’m opening an issue instead of a PR). How about: f"Field {self._batch_arg_name} not found in
{model.__class__.__name__}
,datamodule.__class__.__name__
, nor theirhparams
attributes." ?The text was updated successfully, but these errors were encountered: