Sort imports for optional third-party libraries.
These libraries aren't always installed in the virtual environment where isort is running. Declaring them properly avoids mixing these third-party imports with local imports.
This commit is contained in:
@@ -26,12 +26,12 @@ import torch
|
||||
import torch.nn.functional as F
|
||||
import torch.optim as optim
|
||||
import torch.utils.data as data
|
||||
from tqdm import tqdm, trange
|
||||
|
||||
from nltk.tokenize.treebank import TreebankWordDetokenizer
|
||||
from pplm_classification_head import ClassificationHead
|
||||
from torchtext import data as torchtext_data
|
||||
from torchtext import datasets
|
||||
from tqdm import tqdm, trange
|
||||
|
||||
from pplm_classification_head import ClassificationHead
|
||||
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user