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

Smarter optional dependency imports in the datasets #1195

Merged
merged 1 commit into from
Jan 22, 2019

Conversation

flauted
Copy link
Contributor

@flauted flauted commented Jan 22, 2019

Since there's no guarantee that a Dataset's make_examples class method is only called once, there should not be imports in it. Rather, they should be imported at the module level if possible and the dataset should make sure it has them if it needs them.

Originally part of #1194

@vince62s
Copy link
Member

Thanks, merging.

@vince62s vince62s merged commit a9b15f7 into OpenNMT:master Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants