Skip to content

Commit 06de433

Browse files
authored
[BugFix] Fix ernie tiny tipc (#4427)
1 parent cc4151e commit 06de433

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_tipc/benchmark/modules/ernie_tiny.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import os
1616
import sys
17+
from functools import partial
1718

1819
import paddle.nn as nn
1920
from paddle.io import BatchSampler, DataLoader, DistributedBatchSampler
@@ -25,13 +26,13 @@
2526

2627
from .model_base import BenchmarkBase
2728

28-
sys.path.append(
29+
sys.path.insert(
30+
0,
2931
os.path.abspath(
3032
os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, os.pardir, "model_zoo", "ernie-3.0")
31-
)
33+
),
3234
)
3335

34-
from functools import partial # noqa: E402
3536

3637
from utils import seq_convert_example # noqa: E402
3738

0 commit comments

Comments
 (0)