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

set -e
cd `dirname $0`
export PYTHONPATH=$PWD/../../../../

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

for conf in ${configs[*]}
do
    echo "Generating " $conf
13
    python -m paddle.utils.dump_config $conf.py > $protostr/$conf.protostr.unittest
H
hanchao 已提交
14
    cat ${conf}.py |python test_config_parser_for_non_file_config.py > $protostr/$conf.protostr.non_file_config.unittest
15
done
Y
Yu Yang 已提交
16 17 18 19

for conf in ${whole_configs[*]}
do
    echo "Generating " $conf
20
    python -m paddle.utils.dump_config $conf.py "" --whole > $protostr/$conf.protostr.unittest
H
hanchao 已提交
21
    cat ${conf}.py |python test_config_parser_for_non_file_config.py --whole > $protostr/$conf.protostr.non_file_config.unittest
Y
Yu Yang 已提交
22
done