Skip to content

Conversation

@awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Jun 28, 2020

What does this PR do?

Follow up to #2395 in which we forgot to add the else clause.
Since torchtext is optional, we can't import torchtext.Batch if it's not installed.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG? it is just a follow up to the other PR inside the same release.

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@mergify mergify bot requested a review from a team June 28, 2020 19:08
@awaelchli awaelchli added the bug Something isn't working label Jun 28, 2020
@awaelchli awaelchli requested a review from Borda June 28, 2020 19:16
@awaelchli awaelchli marked this pull request as ready for review June 28, 2020 19:16
@Borda Borda added the priority: 0 High priority task label Jun 28, 2020
if TORCHTEXT_AVAILABLE:
from torchtext.data import Batch
else:
Batch = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I had it there in #2395 :]

@mergify mergify bot requested a review from a team June 28, 2020 19:58
@codecov
Copy link

codecov bot commented Jun 28, 2020

Codecov Report

Merging #2402 into master will decrease coverage by 0%.
The diff coverage is 0%.

@@          Coverage Diff           @@
##           master   #2402   +/-   ##
======================================
- Coverage      88%     88%   -0%     
======================================
  Files          69      69           
  Lines        5468    5469    +1     
======================================
  Hits         4834    4834           
- Misses        634     635    +1     

@Borda Borda added the ready PRs ready to be merged label Jun 28, 2020
@williamFalcon williamFalcon merged commit 058c500 into master Jun 29, 2020
@awaelchli awaelchli deleted the bugfix/torchtext-undefined-Batch branch June 29, 2020 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: 0 High priority task ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants