Skip to content

Commit

Permalink
fix style
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 febfe72 commit adb82a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@
nemo_nlp.huggingface.BERT.list_pretrained_models()
"""
if args.bert_checkpoint and args.bert_config:
pretrained_bert_model = nemo.collections.nlp.nm.trainables.huggingface.BERT(
config_filename=args.bert_config
)
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.huggingface.BERT(
Expand Down
4 changes: 3 additions & 1 deletion examples/nlp/question_answering/question_answering_squad.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ def create_pipeline(
if __name__ == "__main__":
args = parse_args()
if not os.path.exists(args.dev_file):
raise FileNotFoundError("eval data not found. Datasets can be " "obtained using examples/nlp/scripts/get_squad.py")
raise FileNotFoundError(
"eval data not found. Datasets can be " "obtained using examples/nlp/scripts/get_squad.py"
)
if not args.evaluation_only and not os.path.exists(args.train_file):
raise FileNotFoundError(
"train data not found. Datasets can be " "obtained using examples/nlp/scripts/get_squad.py"
Expand Down

0 comments on commit adb82a0

Please sign in to comment.