Skip to content

Commit

Permalink
update package import
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
  • Loading branch information
yzhang123 committed Feb 7, 2020
1 parent 1110589 commit 2909fcf
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion examples/nlp/asr_postprocessor/asr_postprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import torch

import nemo
import nemo.collections.nlp as nemo_nlp
import nemo.collections.nlp.nm.data_layers.machine_translation_datalayer
from nemo import logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
See the list of pretrained models, call:
nemo_nlp.huggingface.BERT.list_pretrained_models()
"""
pretrained_bert_model = nemo.collections.nlp.nm.trainables.common.huggingface.BERT(
pretrained_bert_model = nemo.collections.nlp.nm.trainables.huggingface.BERT(
pretrained_model_name=args.pretrained_bert_model
)
hidden_size = pretrained_bert_model.hidden_size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@
nemo_nlp.huggingface.BERT.list_pretrained_models()
"""
if args.bert_checkpoint and args.bert_config:
pretrained_bert_model = nemo.collections.nlp.nm.trainables.common.huggingface.BERT(
pretrained_bert_model = nemo.collections.nlp.nm.trainables.huggingface.BERT(
config_filename=args.bert_config
)
pretrained_bert_model.restore_from(args.bert_checkpoint)
else:
pretrained_bert_model = nemo.collections.nlp.nm.trainables.common.huggingface.BERT(
pretrained_bert_model = nemo.collections.nlp.nm.trainables.huggingface.BERT(
pretrained_model_name=args.pretrained_bert_model
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
import json
import os

import nemo
import nemo.collections.nlp as nemo_nlp
import nemo.core as nemo_core
from nemo import logging
Expand Down
1 change: 0 additions & 1 deletion nemo/collections/nlp/data/datasets/qa_squad_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import json
import os
import pickle
import sys

import numpy as np
import torch
Expand Down

0 comments on commit 2909fcf

Please sign in to comment.