Onnx: collect_snippets writes to console

Created on 3 Jul 2020  路  1Comment  路  Source: onnx/onnx

Bug Report

Describe the bug

collect_snippets writes warning messages to console.

System information

  • OS Platform and Distribution: macOS Catalina
  • Python version: 3.7

Reproduction instructions

git clone --quiet https://github.com/onnx/onnx.git
pushd onnx
git submodule update --quiet --init --recursive
python -m venv ../env
source ../env/bin/activate
python -m pip install --quiet --upgrade pip
python -m pip install --quiet protobuf
export ONNX_ML=1
export ONNX_NAMESPACE=onnx
python -m pip install --quiet .
popd
python -c "from onnx.backend.test.case import collect_snippets; snippets = collect_snippets()"
deactivate

Expected behavior

No text is printed to console.

Actual behavior

~/env/lib/python3.7/site-packages/onnx/backend/test/case/node/reduce_log_sum_exp.py:32: RuntimeWarning: overflow encountered in log
  np.exp(data), axis=tuple(axes), keepdims=keepdims == 1))
~/env/lib/python3.7/site-packages/onnx/backend/test/case/node/reduce_log_sum_exp.py:67: RuntimeWarning: overflow encountered in log
  keepdims=keepdims == 1))
~/env/lib/python3.7/site-packages/onnx/backend/test/case/node/reduce_log_sum_exp.py:103: RuntimeWarning: overflow encountered in log
  keepdims=keepdims == 1))
~/env/lib/python3.7/site-packages/onnx/backend/test/case/node/reduce_log_sum_exp.py:136: RuntimeWarning: overflow encountered in log
  keepdims=keepdims == 1))

@neginraoof

bug

Most helpful comment

Hi @lutzroeder,
I encountered the same error only on MacOS (Windows works fine) when using some commands.
Using longer float type should fix this warning. I will propose a PR https://github.com/onnx/onnx/pull/2878 and cc @neginraoof for review.

Thank you for reporting this bug!

>All comments

Hi @lutzroeder,
I encountered the same error only on MacOS (Windows works fine) when using some commands.
Using longer float type should fix this warning. I will propose a PR https://github.com/onnx/onnx/pull/2878 and cc @neginraoof for review.

Thank you for reporting this bug!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ma-hei picture ma-hei  路  4Comments

zhangguangzhi picture zhangguangzhi  路  5Comments

PenghuiCheng picture PenghuiCheng  路  3Comments

sousoux picture sousoux  路  3Comments

cdeterman picture cdeterman  路  5Comments