Merged
Conversation
3881ce7 to
f13a85b
Compare
IgnatovFedor
requested changes
Aug 15, 2023
Collaborator
IgnatovFedor
left a comment
There was a problem hiding this comment.
change version in deeppavlov._metadata to 1.3.0
deeppavlov/core/commands/train.py
Outdated
| if iterator is None: | ||
| try: | ||
| data = read_data_by_config(config) | ||
| # if the value 'val_every_n_epochs' is set in the config and there is no validation data - raise exception |
Collaborator
There was a problem hiding this comment.
remove comment - unnecessary
deeppavlov/core/commands/train.py
Outdated
| try: | ||
| data = read_data_by_config(config) | ||
| # if the value 'val_every_n_epochs' is set in the config and there is no validation data - raise exception | ||
| if config.get('train', {}).get('val_every_n_epochs', None) and not data.get('valid', []): |
Collaborator
There was a problem hiding this comment.
add batch parameter check, replace not data.get('valid', []) with not data.get('valid')
deeppavlov/core/commands/train.py
Outdated
| # if the value 'val_every_n_epochs' is set in the config and there is no validation data - raise exception | ||
| if config.get('train', {}).get('val_every_n_epochs', None) and not data.get('valid', []): | ||
| error_message = 'The value "val_every_n_epochs" is set in the config but no validation data is provided' | ||
| log.exception(error_message) |
Collaborator
There was a problem hiding this comment.
remove log.exception - duplicates exception output
deeppavlov/core/commands/train.py
Outdated
| if config.get('train', {}).get('val_every_n_epochs', None) and not data.get('valid', []): | ||
| error_message = 'The value "val_every_n_epochs" is set in the config but no validation data is provided' | ||
| log.exception(error_message) | ||
| raise Exception(error_message) |
Collaborator
There was a problem hiding this comment.
Replace with more specific error type
Merged
IgnatovFedor
approved these changes
Aug 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.