Skip to content

1167 protobuf fix #1168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,6 @@ function print_usage {
echo "To choose an alternative python executable, set the environmental variable, \"MONAI_PY_EXE\"."
}

# FIXME: https://github.com/Project-MONAI/MONAI/issues/4354
protobuf_major_version=$(${PY_EXE} -m pip list | grep '^protobuf ' | tr -s ' ' | cut -d' ' -f2 | cut -d'.' -f1)
if [ "$protobuf_major_version" -ge "4" ]
then
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
fi

function print_style_fail_msg() {
echo "${red}Check failed!${noColor}"
}
Expand Down Expand Up @@ -517,6 +510,16 @@ for file in "${files[@]}"; do
done

python -c 'import monai; monai.config.print_config()'

# FIXME: https://github.com/Project-MONAI/MONAI/issues/4354
protobuf_major_version=$(${PY_EXE} -m pip list | grep '^protobuf ' | tr -s ' ' | cut -d' ' -f2 | cut -d'.' -f1)
if [ "$protobuf_major_version" -ge "4" ]
then
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
else
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=
fi

cmd=$(echo "papermill ${papermill_opt} --progress-bar -k ${kernelspec}")
echo "$cmd"
time out=$(echo "$notebook" | eval "$cmd")
Expand Down