File tree Expand file tree Collapse file tree 13 files changed +14
-12
lines changed
examples/machine_translation/transformer Expand file tree Collapse file tree 13 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -281,11 +281,11 @@ def do_inference(args):
281
281
282
282
if args .profile :
283
283
import importlib
284
- import util .recorder as recorder
284
+ import tls .recorder as recorder
285
285
try :
286
286
mod = importlib .import_module ("auto_log" )
287
287
except ImportError :
288
- mod = importlib .import_module ("util .recorder" )
288
+ mod = importlib .import_module ("tls .recorder" )
289
289
args .mod = mod
290
290
291
291
do_inference (args )
Original file line number Diff line number Diff line change 17
17
import paddle
18
18
import psutil
19
19
20
- from util .benchmark_utils import PaddleInferBenchmark
20
+ from tls .benchmark_utils import PaddleInferBenchmark
21
21
22
22
import paddle
23
23
if paddle .is_compiled_with_cuda ():
Original file line number Diff line number Diff line change 19
19
sys .path .append (
20
20
os .path .abspath (os .path .join (os .path .dirname (__file__ ), os .pardir )))
21
21
import reader
22
- from util .record import AverageStatistical
22
+ from tls .record import AverageStatistical
23
23
24
24
FORMAT = '%(asctime)s-%(levelname)s: %(message)s'
25
25
logging .basicConfig (level = logging .INFO , format = FORMAT )
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 16
16
from paddlenlp .utils .log import logger
17
17
from paddlenlp .utils import profiler
18
18
19
- from util .record import AverageStatistical
20
- from util .to_static import apply_to_static
19
+ from tls .record import AverageStatistical
20
+ from tls .to_static import apply_to_static
21
21
22
22
23
23
def parse_args ():
Original file line number Diff line number Diff line change @@ -52,6 +52,6 @@ null:null
52
52
===========================train_benchmark_params==========================
53
53
batch_size:32
54
54
fp_items:fp32
55
- epoch:1
55
+ epoch:3
56
56
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
57
57
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ elif [ ${MODE} = "whole_infer" ];then
272
272
elif [ ${MODE} = " benchmark_train" ]; then
273
273
if [ ${model_name} == " bigru_crf" ]; then
274
274
rm -rf ./data/lexical_analysis_dataset_tiny ./data/lexical_analysis_dataset_tiny.tar.gz
275
- wget -nc -P ./data/ https://bj.bcebos.com/paddlenlp/datasets/lexical_analysis_dataset_tiny.tar.gz --no-check-certificate
275
+ python ${BENCHMARK_ROOT} /paddlecloud/file_upload_download.py --remote-path frame_benchmark/paddle/PaddleNLP/lexical_analysis_dataset_tiny/ --local-path ./data/ --mode download
276
276
cd ./data/ && tar xfz lexical_analysis_dataset_tiny.tar.gz && cd ..
277
277
fi
278
278
@@ -288,6 +288,8 @@ elif [ ${MODE} = "benchmark_train" ];then
288
288
ln -s hdf5_lower_case_1_seq_len_512_max_pred_80_masked_lm_prob_0.15_random_seed_12345_dupe_factor_5/wikicorpus_en_seqlen512/ wikicorpus_en_seqlen512
289
289
290
290
cd ..
291
+
292
+ python -m pip install h5py -i https://mirror.baidu.com/pypi/simple
291
293
fi
292
294
293
295
if [[ ${model_name} =~ gpt* ]]; then
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
15
15
python -m pip install setuptools_scm
16
16
python -m pip install Cython
17
17
python -m pip install -r ../requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
18
- python -m pip install pybind11 regex sentencepiece tqdm visualdl attrdict pyyaml -i https://mirror.baidu.com/pypi/simple
18
+ python -m pip install pybind11 regex sentencepiece tqdm visualdl attrdict pyyaml h5py -i https://mirror.baidu.com/pypi/simple
19
19
20
20
python -m pip install -e ../
21
21
# python -m pip install paddlenlp # PDC 镜像中安装失败
You can’t perform that action at this time.
0 commit comments