|
@ -17,7 +17,8 @@ os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' |
|
|
warnings.filterwarnings("ignore") |
|
|
warnings.filterwarnings("ignore") |
|
|
t_logging.set_verbosity_error() |
|
|
t_logging.set_verbosity_error() |
|
|
|
|
|
|
|
|
# full_models = AutoTransformers.supported_model_names() |
|
|
|
|
|
|
|
|
# op = ops.sentence_embedding.transformers().get_op() |
|
|
|
|
|
# full_models = op.supported_model_names() |
|
|
# checked_models = AutoTransformers.supported_model_names(format='onnx') |
|
|
# checked_models = AutoTransformers.supported_model_names(format='onnx') |
|
|
# models = [x for x in full_models if x not in checked_models] |
|
|
# models = [x for x in full_models if x not in checked_models] |
|
|
models = ['distilbert-base-cased', 'sentence-transformers/paraphrase-albert-small-v2'] |
|
|
models = ['distilbert-base-cased', 'sentence-transformers/paraphrase-albert-small-v2'] |
|
@ -80,7 +81,7 @@ for name in models: |
|
|
status[3] = 'success' |
|
|
status[3] = 'success' |
|
|
except Exception as e: |
|
|
except Exception as e: |
|
|
logger.error(f'FAIL TO CHECK ONNX: {e}') |
|
|
logger.error(f'FAIL TO CHECK ONNX: {e}') |
|
|
continue |
|
|
|
|
|
|
|
|
pass |
|
|
try: |
|
|
try: |
|
|
sess = onnxruntime.InferenceSession(onnx_path, |
|
|
sess = onnxruntime.InferenceSession(onnx_path, |
|
|
providers=onnxruntime.get_available_providers()) |
|
|
providers=onnxruntime.get_available_providers()) |
|
|