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

Dataset.buffer_size is not properly initialized #765

Open
varisd opened this issue Oct 16, 2018 · 0 comments
Open

Dataset.buffer_size is not properly initialized #765

varisd opened this issue Oct 16, 2018 · 0 comments
Assignees
Labels

Comments

@varisd
Copy link
Member

varisd commented Oct 16, 2018

When initializing Dataset with buffer_size=None, attribute self.buffer_size is not created even though it can be called later in the Dataset methods. Most of the time, it is checked (by checking the value of the self.lazy attribute), however, this is not always the case as in
https://github.com/ufal/neuralmonkey/blob/master/neuralmonkey/dataset.py#L569
(Also notice the mypy miss on the type mismatch of 'int' vs 'Tuple[int, int]')

Having the dependency of the value of self.buffer_size on self.lazy is also imho a bad practice and worsens code readability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants