Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
9fc8dcb2
"vscode:/vscode.git/clone" did not exist on "d12ceb48bad126768e44d2bd958fa7638abd0f16"
Commit
9fc8dcb2
authored
Dec 22, 2019
by
Aymeric Augustin
Browse files
Standardize import.
Every other file uses this pattern.
parent
f2522869
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
examples/run_ner.py
examples/run_ner.py
+6
-1
No files found.
examples/run_ner.py
View file @
9fc8dcb2
...
...
@@ -25,7 +25,6 @@ import random
import
numpy
as
np
import
torch
from
seqeval.metrics
import
f1_score
,
precision_score
,
recall_score
from
tensorboardX
import
SummaryWriter
from
torch.nn
import
CrossEntropyLoss
from
torch.utils.data
import
DataLoader
,
RandomSampler
,
SequentialSampler
,
TensorDataset
from
torch.utils.data.distributed
import
DistributedSampler
...
...
@@ -54,6 +53,12 @@ from transformers import (
from
utils_ner
import
convert_examples_to_features
,
get_labels
,
read_examples_from_file
try
:
from
torch.utils.tensorboard
import
SummaryWriter
except
ImportError
:
from
tensorboardX
import
SummaryWriter
logger
=
logging
.
getLogger
(
__name__
)
ALL_MODELS
=
sum
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment