mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-19 20:48:22 +06:00
* fix #2399 an ImportError in official example * style Co-authored-by: Julien Chaumond <chaumond@gmail.com>
This commit is contained in:
parent
78528742f1
commit
f01b3e6680
@ -9,7 +9,6 @@ import re
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
from absl import app, flags, logging
|
from absl import app, flags, logging
|
||||||
from fastprogress import master_bar, progress_bar
|
|
||||||
from seqeval import metrics
|
from seqeval import metrics
|
||||||
|
|
||||||
from transformers import (
|
from transformers import (
|
||||||
@ -29,6 +28,12 @@ from transformers import (
|
|||||||
from utils_ner import convert_examples_to_features, get_labels, read_examples_from_file
|
from utils_ner import convert_examples_to_features, get_labels, read_examples_from_file
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
from fastprogress import master_bar, progress_bar
|
||||||
|
except ImportError:
|
||||||
|
from fastprogress.fastprogress import master_bar, progress_bar
|
||||||
|
|
||||||
|
|
||||||
ALL_MODELS = sum(
|
ALL_MODELS = sum(
|
||||||
(tuple(conf.pretrained_config_archive_map.keys()) for conf in (BertConfig, RobertaConfig, DistilBertConfig)), ()
|
(tuple(conf.pretrained_config_archive_map.keys()) for conf in (BertConfig, RobertaConfig, DistilBertConfig)), ()
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user