Skip to content

Commit bb90318

Browse files
test the inference decode
zero the crf transitions so the expected path is just the argmax
1 parent 8327f4f commit bb90318

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

etc/scripts/dataset_pipeline/test_train_model.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# tests for train_model.py and export_onnx.py
22
# these cover the pure logic, the heavy model parts are exercised on a gpu
3+
import os
34
import sys
45
from pathlib import Path
56

7+
# transformers goes looking for keras and dies on keras 3
8+
os.environ.setdefault('USE_TF', '0')
9+
610
sys.path.insert(0, str(Path(__file__).parent))
711
from train_model import align_labels
812
from train_model import decode_row

0 commit comments

Comments
 (0)