diff --git a/test_tipc/loss_filter.py b/test_tipc/extract_loss.py similarity index 99% rename from test_tipc/loss_filter.py rename to test_tipc/extract_loss.py index c0fc2274e43fa8686e7378b24d98501680aba341..267d0d916a9c199e5a09b7e2e5edf6194d5c5a0c 100644 --- a/test_tipc/loss_filter.py +++ b/test_tipc/extract_loss.py @@ -4,7 +4,6 @@ import re def parameter_parser(): - import argparse parser = argparse.ArgumentParser(description="Support Args:") parser.add_argument( "-v", diff --git a/test_tipc/test_dy2static_correctness.sh b/test_tipc/test_train_dy2static_python.sh similarity index 75% rename from test_tipc/test_dy2static_correctness.sh rename to test_tipc/test_train_dy2static_python.sh index e3cd1a828f40ce02591356b9150e6a615f8adfaa..a4a990d72f66ee1a7706360f9e4fb5a363576725 100644 --- a/test_tipc/test_dy2static_correctness.sh +++ b/test_tipc/test_train_dy2static_python.sh @@ -1,25 +1,9 @@ #!/bin/bash source test_tipc/common_func.sh -function readlinkf() { - perl -MCwd -e 'print Cwd::abs_path shift' "$1"; -} - -function func_parser_config() { - strs=$1 - IFS=" " - array=(${strs}) - tmp=${array[2]} - echo ${tmp} -} - # always use the lite_train_lite_infer mode to speed. Modify the config file. MODE=lite_train_lite_infer BASEDIR=$(dirname "$0") -REPO_ROOT_PATH=$(readlinkf ${BASEDIR}/../) - -echo $BASEDIR -echo $REPO_ROOT_PATH FILENAME=$1 sed -i 's/gpu_list.*$/gpu_list:0/g' $FILENAME @@ -52,8 +36,8 @@ echo $cmd eval $cmd # analysis and compare the losses. -dyout=`cat $dy2static_output | python3 test_tipc/loss_filter.py -v 'Iter:' -e 'loss: {%f},'` -stout=`cat $dygraph_output | python3 test_tipc/loss_filter.py -v 'Iter:' -e 'loss: {%f},' ` +dyout=`cat $dy2static_output | python3 test_tipc/extract_loss.py -v 'Iter:' -e 'loss: {%f},'` +stout=`cat $dygraph_output | python3 test_tipc/extract_loss.py -v 'Iter:' -e 'loss: {%f},' ` echo $dyout echo $stout if [ "$dyout" = "" ]; then