Skip to content

[IR] Allow tensor created with numpy unsupported dtypes #5780

[IR] Allow tensor created with numpy unsupported dtypes

[IR] Allow tensor created with numpy unsupported dtypes #5780

GitHub Actions / Test Results failed May 3, 2024 in 0s

4 fail, 2 531 skipped, 5 627 pass in 49m 25s

     25 files   -       3      25 suites   - 3   49m 25s ⏱️ - 45m 46s
  8 162 tests +  2 247   5 627 ✅ + 1 600   2 531 💤 +    647   4 ❌ + 1 
134 475 runs   - 258 401  47 083 ✅  - 24 990  87 312 💤  - 233 433  80 ❌ +23 

Results for commit bfb1425. ± Comparison against earlier commit da3a677.

Annotations

Check warning on line 0 in onnxscript.ir.serde_test.TensorProtoTensorTest

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 20 runs failed: test_tensor_proto_tensor_5_FLOAT8E4M3FN (onnxscript.ir.serde_test.TensorProtoTensorTest)

artifacts/Test Results (py310-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ort-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ort-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-torch-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py38-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py38-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-windows-latest)/pytest.xml [took 0s]
Raw output
ValueError: -60 is not a float8.
.nox/test/lib/python3.8/site-packages/parameterized/parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript/ir/serde_test.py:37: in test_tensor_proto_tensor
    array_from_raw_data = onnx.numpy_helper.to_array(tensor_proto_from_raw_data)
.nox/test/lib/python3.8/site-packages/onnx/numpy_helper.py:267: in to_array
    return float8e4m3_to_float32(data, dims)
.nox/test/lib/python3.8/site-packages/onnx/numpy_helper.py:112: in float8e4m3_to_float32
    res = _float8e4m3_to_float32(data, fn=fn, uz=uz)
.nox/test/lib/python3.8/site-packages/numpy/lib/function_base.py:2329: in __call__
    return self._vectorize_call(func=func, args=vargs)
.nox/test/lib/python3.8/site-packages/numpy/lib/function_base.py:2407: in _vectorize_call
    ufunc, otypes = self._get_ufunc_and_otypes(func=func, args=args)
.nox/test/lib/python3.8/site-packages/numpy/lib/function_base.py:2367: in _get_ufunc_and_otypes
    outputs = func(*inputs)
.nox/test/lib/python3.8/site-packages/numpy/lib/function_base.py:2324: in func
    return self.pyfunc(*the_args, **kwargs)
.nox/test/lib/python3.8/site-packages/onnx/numpy_helper.py:46: in _float8e4m3_to_float32_scalar
    raise ValueError(f"{ival} is not a float8.")
E   ValueError: -60 is not a float8.

Check warning on line 0 in onnxscript.ir.serde_test.TensorProtoTensorTest

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 20 runs failed: test_tensor_proto_tensor_int_4_INT4 (onnxscript.ir.serde_test.TensorProtoTensorTest)

artifacts/Test Results (py310-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ort-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ort-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-torch-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py38-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py38-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-windows-latest)/pytest.xml [took 0s]
Raw output
ValueError: cannot reshape array of size 2 into shape (1,4)
.nox/test/lib/python3.8/site-packages/parameterized/parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript/ir/serde_test.py:60: in test_tensor_proto_tensor_int
    array_from_raw_data = onnx.numpy_helper.to_array(tensor_proto_from_raw_data)
.nox/test/lib/python3.8/site-packages/onnx/numpy_helper.py:287: in to_array
    return unpack_int4(data, dims, signed=True)
.nox/test/lib/python3.8/site-packages/onnx/numpy_helper.py:217: in unpack_int4
    res = res.reshape(dims)
E   ValueError: cannot reshape array of size 2 into shape (1,4)

Check warning on line 0 in onnxscript.ir.serde_test.TensorProtoTensorTest

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 20 runs failed: test_tensor_proto_tensor_uint_4_UINT4 (onnxscript.ir.serde_test.TensorProtoTensorTest)

artifacts/Test Results (py310-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ort-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ort-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-torch-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py38-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py38-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-windows-latest)/pytest.xml [took 0s]
Raw output
ValueError: cannot reshape array of size 2 into shape (1,3)
.nox/test/lib/python3.8/site-packages/parameterized/parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript/ir/serde_test.py:83: in test_tensor_proto_tensor_uint
    array_from_raw_data = onnx.numpy_helper.to_array(tensor_proto_from_raw_data)
.nox/test/lib/python3.8/site-packages/onnx/numpy_helper.py:283: in to_array
    return unpack_int4(data, dims, signed=False)
.nox/test/lib/python3.8/site-packages/onnx/numpy_helper.py:217: in unpack_int4
    res = res.reshape(dims)
E   ValueError: cannot reshape array of size 2 into shape (1,3)

Check warning on line 0 in onnxscript.ir.serde_test.TensorProtoTensorTest

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 20 runs failed: test_tensor_proto_tensor_6_FLOAT8E4M3FNUZ (onnxscript.ir.serde_test.TensorProtoTensorTest)

artifacts/Test Results (py310-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ort-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ort-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-torch-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py311-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py312-torch-nightly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py38-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py38-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py39-windows-latest)/pytest.xml [took 0s]
Raw output
ValueError: -52 is not a float8.
.nox/test/lib/python3.8/site-packages/parameterized/parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript/ir/serde_test.py:37: in test_tensor_proto_tensor
    array_from_raw_data = onnx.numpy_helper.to_array(tensor_proto_from_raw_data)
.nox/test/lib/python3.8/site-packages/onnx/numpy_helper.py:271: in to_array
    return float8e4m3_to_float32(data, dims, uz=True)
.nox/test/lib/python3.8/site-packages/onnx/numpy_helper.py:112: in float8e4m3_to_float32
    res = _float8e4m3_to_float32(data, fn=fn, uz=uz)
.nox/test/lib/python3.8/site-packages/numpy/lib/function_base.py:2329: in __call__
    return self._vectorize_call(func=func, args=vargs)
.nox/test/lib/python3.8/site-packages/numpy/lib/function_base.py:2407: in _vectorize_call
    ufunc, otypes = self._get_ufunc_and_otypes(func=func, args=args)
.nox/test/lib/python3.8/site-packages/numpy/lib/function_base.py:2367: in _get_ufunc_and_otypes
    outputs = func(*inputs)
.nox/test/lib/python3.8/site-packages/numpy/lib/function_base.py:2324: in func
    return self.pyfunc(*the_args, **kwargs)
.nox/test/lib/python3.8/site-packages/onnx/numpy_helper.py:46: in _float8e4m3_to_float32_scalar
    raise ValueError(f"{ival} is not a float8.")
E   ValueError: -52 is not a float8.