Skip to content

Commit 5c9634d

Browse files
authored
Tipc fix 0525 (#344)
* fix tipc bugs caused by examples update
1 parent 610dae2 commit 5c9634d

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

test_tipc/benchmark_train.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ dataline=`cat $FILENAME`
8484
IFS=$'\n'
8585
lines=(${dataline})
8686
model_name=$(func_parser_value "${lines[1]}")
87+
workdir=$(func_parser_value "${lines[60]}")
88+
cd ${PDSC_DIR}/${workdir}
8789
python=$(func_parser_value "${lines[2]}")
8890
line_num=`grep -n "train_benchmark_params" $FILENAME | cut -d ":" -f 1`
8991
batch_size=$(func_parser_value "${lines[line_num]}")

test_tipc/configs/train_2d_unsteady_continuous/train_2d_unsteady_continuous.txt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
===========================train_params===========================
2-
model_name:cylinder2d_unsteady_train_newapi
2+
model_name:cylinder2d_unsteady_Re100
33
python:python3.10
44
gpu_list:0
55
Global.use_gpu:null
6-
Global.auto_cast:fp32
7-
Global.epoch_num:benchmark_train=20
8-
Global.save_model_dir:./output/
9-
Train.loader.batch_size_per_card:null
6+
null:null
7+
--epochs
8+
null:null
9+
null:null
1010
Global.pretrained_model:null
1111
train_model_name:latest
1212
train_infer_img_dir:null
1313
--profiler_options:null
1414
##
1515
trainer:norm_train
16-
norm_train:/examples/cylinder/2d_unsteady/cylinder2d_unsteady_train_newapi.py
16+
norm_train:/examples/cylinder/2d_unsteady/cylinder2d_unsteady_Re100.py
1717
pact_train:null
1818
fpgm_train:null
1919
distill_train:null
@@ -43,18 +43,19 @@ inference:tools/infer/predict_det.py
4343
--cpu_threads:null
4444
--rec_batch_num:1
4545
--use_tensorrt:null
46-
--precision:fp32
46+
--precision:null
4747
--det_model_dir:
4848
--image_dir:null
4949
null:null
5050
--benchmark:True
5151
null:null
5252
===========================train_benchmark_params==========================
5353
batch_size:1
54-
fp_items:fp32
54+
fp_items:null
5555
epoch:20
56-
--profiler_options:batch_range=[1,1];state=GPU;tracer_option=Default;profile_path=model.profile
56+
null:null;state=GPU;tracer_option=Default;profile_path=model.profile
5757
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=0
5858
===========================prepare_params==========================
5959
download_dataset:/examples/cylinder/2d_unsteady/download_dataset.py
60-
pip:pip
60+
pip:pip
61+
workdir:examples/cylinder/2d_unsteady

test_tipc/configs/train_eular_beam/train_eular_beam.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ epoch:20
5757
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=0
5858
===========================prepare_params==========================
5959
download_dataset:
60-
pip:pip
60+
pip:pip
61+
workdir:examples/euler_beam

test_tipc/prepare.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ lines=(${dataline})
1818
download_dataset=$(func_parser_value "${lines[61]}")
1919
python=$(func_parser_value "${lines[2]}")
2020
export pip=$(func_parser_value "${lines[62]}")
21+
workdir=$(func_parser_value "${lines[63]}")
2122
${pip} install --upgrade pip
2223
${pip} install pybind11
2324
${pip} install -r requirements.txt
2425

25-
if [ -n ${download_dataset} ] ; then
26+
if [ ${download_dataset} ] ; then
27+
cd ${PDSC_DIR}/${workdir}
2628
${python} ${PDSC_DIR}${download_dataset}
2729
fi

0 commit comments

Comments
 (0)