-
Notifications
You must be signed in to change notification settings - Fork 672
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
🐞 Fix issues when validation and test split modes set to none #1703
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Willy Fitra Hendria <willyfitrahendria@gmail.com>
Signed-off-by: Willy Fitra Hendria <willyfitrahendria@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few questions regarding this fix. I am not clear on the assumed intention behind passing split mode as None. From what I understand it is only to split the datamodule. But it should not restrict users if they pass test or validation dataset separately. But I don't have a lot of familiarity with data modules. Maybe @djdameln can chime in.
@@ -671,7 +675,12 @@ def train( | |||
self.trainer.validate(model, val_dataloaders, None, verbose=False, datamodule=datamodule) | |||
else: | |||
self.trainer.fit(model, train_dataloaders, val_dataloaders, datamodule, ckpt_path) | |||
self.trainer.test(model, test_dataloaders, ckpt_path=ckpt_path, datamodule=datamodule) | |||
|
|||
if datamodule is not None and datamodule.test_split_mode == TestSplitMode.NONE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if datamodule
is not None and test_dataloaders
is not None
Returns: | ||
DictConfig | ListConfig: Updated configurable parameters in DictConfig object. | ||
""" | ||
if config.data.init_args.val_split_mode == ValSplitMode.NONE and config.trainer.limit_val_batches != 0.0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure that if val_split_mode
is None, that validation dataset is not provided separately?
📝 Description
This PR is based on the close PR #1628:
when val_split_mode is 'NONE' , skip the validation stage by setting
config.trainer.limit_val_batches
to 0.0when test_split_mode is 'NONE', skip the test stage by including a conditional check
datamodule.test_split_mode == TestSplitMode.NONE
. To address a comment in the closed PR, a warning is provided to check the length of the test set that is being skipped.🛠️ Fixes 🐞 v1 - Issues when validation and test split modes are set to 'none' #1629
✨ Changes
Select what type of change your PR is:
✅ Checklist
Before you submit your pull request, please make sure you have completed the following steps: