File tree Expand file tree Collapse file tree 3 files changed +27
-8
lines changed Expand file tree Collapse file tree 3 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -438,12 +438,12 @@ class UIETask(Task):
438
438
},
439
439
"__internal_testing__/tiny-random-uie-x" : {
440
440
"model_state" : [
441
- "https://bj.bcebos.com/paddlenlp/models/community/__internal_testing__/tiny-random-uie-x /model_state.pdparams" ,
442
- "b62bdbfec23ee839c5d0a8a7e6920075 " ,
441
+ "https://bj.bcebos.com/paddlenlp/models/community/__internal_testing__/tiny-random-uie-x_v1.0 /model_state.pdparams" ,
442
+ "d9b573b31a82b860b6e5a3005d7b879e " ,
443
443
],
444
444
"config" : [
445
- "https://bj.bcebos.com/paddlenlp/models/community/__internal_testing__/tiny-random-uie-x /config.json" ,
446
- "abeaeacca5316e2cbe779f37d986efb4 " ,
445
+ "https://bj.bcebos.com/paddlenlp/models/community/__internal_testing__/tiny-random-uie-x_v1.0 /config.json" ,
446
+ "27d715e680596a69d882056a400d97db " ,
447
447
],
448
448
"vocab_file" : [
449
449
"https://bj.bcebos.com/paddlenlp/models/community/__internal_testing__/tiny-random-uie-x/vocab.txt" ,
Original file line number Diff line number Diff line change @@ -234,23 +234,23 @@ class ZeroShotTextClassificationTask(Task):
234
234
"__internal_testing__/tiny-random-utc" : {
235
235
"model_state" : [
236
236
"https://bj.bcebos.com/paddlenlp/models/community/__internal_testing__/tiny-random-utc/model_state.pdparams" ,
237
- "5ca864e9cc07b54e66f5caa184ddfffb " ,
237
+ "d303b59447be690530c35c73f8fd03cd " ,
238
238
],
239
239
"config" : [
240
240
"https://bj.bcebos.com/paddlenlp/models/community/__internal_testing__/tiny-random-utc/config.json" ,
241
- "1e8b508d0fbefca16f94c96ef72b3dd3 " ,
241
+ "3420a6638a7c73c6239eb1d7ca1bc5fe " ,
242
242
],
243
243
"vocab_file" : [
244
244
"https://bj.bcebos.com/paddlenlp/models/community/__internal_testing__/tiny-random-utc/vocab.txt" ,
245
- "fd630e130f707f860b0edd148f0445d9 " ,
245
+ "97eb0ec5a5890c8190e10e251af2e133 " ,
246
246
],
247
247
"special_tokens_map" : [
248
248
"https://bj.bcebos.com/paddlenlp/models/community/__internal_testing__/tiny-random-utc/special_tokens_map.json" ,
249
249
"8b3fb1023167bb4ab9d70708eb05f6ec" ,
250
250
],
251
251
"tokenizer_config" : [
252
252
"https://bj.bcebos.com/paddlenlp/models/community/__internal_testing__/tiny-random-utc/tokenizer_config.json" ,
253
- "dcb0f3257830c0eb1f2de47f2d86f89a " ,
253
+ "258fc552c15cec90046066ca122899e2 " ,
254
254
],
255
255
},
256
256
}
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ import os
16
+ import shutil
15
17
import unittest
16
18
17
19
from paddlenlp import Taskflow
20
+ from paddlenlp .utils .env import PPNLP_HOME
18
21
19
22
from ..testing_utils import get_tests_dir
20
23
@@ -32,6 +35,22 @@ def setUpClass(cls):
32
35
model = "__internal_testing__/tiny-random-uie-m" ,
33
36
)
34
37
38
+ tiny_uie_m_path = os .path .join (
39
+ PPNLP_HOME , "taskflow/information_extraction/__internal_testing__/tiny-random-uie-m/"
40
+ )
41
+ tiny_uie_x_path = os .path .join (
42
+ PPNLP_HOME , "taskflow/information_extraction/__internal_testing__/tiny-random-uie-x/"
43
+ )
44
+
45
+ if not os .path .exists (tiny_uie_x_path ):
46
+ os .mkdir (tiny_uie_x_path )
47
+
48
+ for file_to_copy in ["vocab.txt" , "sentencepiece.bpe.model" ]:
49
+ shutil .copy (
50
+ os .path .join (tiny_uie_m_path , file_to_copy ),
51
+ os .path .join (tiny_uie_x_path , file_to_copy ),
52
+ )
53
+
35
54
cls .uie_x = Taskflow (
36
55
task = "information_extraction" ,
37
56
model = "__internal_testing__/tiny-random-uie-x" ,
You can’t perform that action at this time.
0 commit comments