generate_protostr.sh 876 字节
Newer Older
1 2 3 4 5
#!/bin/bash

set -e
cd `dirname $0`

6
protostr=$PWD/protostr
7
. file_list.sh
8 9 10 11

for conf in ${configs[*]}
do
    echo "Generating " $conf
L
liaogang 已提交
12
    $1 -m paddle.utils.dump_config $conf.py > $protostr/$conf.protostr.unittest
13 14 15
    if [ ! -f "$protostr/$conf.protostr" ]; then 
        cp $protostr/$conf.protostr.unittest $protostr/$conf.protostr
    fi
L
liaogang 已提交
16
    cat ${conf}.py |$1 test_config_parser_for_non_file_config.py > $protostr/$conf.protostr.non_file_config.unittest
17
done
Y
Yu Yang 已提交
18 19 20 21

for conf in ${whole_configs[*]}
do
    echo "Generating " $conf
L
liaogang 已提交
22
    $1 -m paddle.utils.dump_config $conf.py "" --whole > $protostr/$conf.protostr.unittest
23 24 25
    if [ ! -f "$protostr/$conf.protostr" ]; then 
        cp $protostr/$conf.protostr.unittest $protostr/$conf.protostr
    fi
L
liaogang 已提交
26
    cat ${conf}.py |$1 test_config_parser_for_non_file_config.py --whole > $protostr/$conf.protostr.non_file_config.unittest
Y
Yu Yang 已提交
27
done