Skip to content

Commit 91388aa

Browse files
authored
fix: config json str read command (#351)
1 parent 4036efa commit 91388aa

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

graph_net/test/chain_naive_graph_decomposer_test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ os.path.dirname(graph_net.__file__))")
55

66
# input model path
77
MODEL_PATH_IN_SAMPLES=/timm/resnet18
8-
read -r -d '' extractor_config_json_str <<EOF
8+
extractor_config_json_str=$(cat <<EOF
99
{
1010
"custom_extractor_path": "$GRAPH_NET_ROOT/torch/naive_graph_decomposer.py",
1111
"custom_extractor_config": {
@@ -16,6 +16,7 @@ read -r -d '' extractor_config_json_str <<EOF
1616
}
1717
}
1818
EOF
19+
)
1920
EXTRACTOR_CONFIG=$(echo $extractor_config_json_str | base64 -w 0)
2021

2122
mkdir -p /tmp/naive_decompose_workspace

graph_net/test/naive_graph_decomposer_test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ os.path.dirname(graph_net.__file__))")
55

66
# input model path
77
MODEL_PATH_IN_SAMPLES=/timm/resnet18
8-
read -r -d '' extractor_config_json_str <<EOF
8+
extractor_config_json_str=$(cat <<EOF
99
{
1010
"custom_extractor_path": "$GRAPH_NET_ROOT/torch/naive_graph_decomposer.py",
1111
"custom_extractor_config": {
@@ -17,6 +17,7 @@ read -r -d '' extractor_config_json_str <<EOF
1717
}
1818
}
1919
EOF
20+
)
2021
EXTRACTOR_CONFIG=$(echo $extractor_config_json_str | base64 -w 0)
2122

2223
mkdir -p /tmp/naive_decompose_workspace

0 commit comments

Comments
 (0)