aws / aws/amazon-sagemaker-examples
[Bug Report]
- Dominant language
- Jupyter Notebook
- Stars
- 11k
- Forks
- 7k
- Avg merge
- 8h 29m
- Merged PRs (30d)
- 8
Description
**Link to the notebook**
[Add the link to the notebook.](https://github.com/aws/amazon-sagemaker-examples/blob/main/aws_sagemaker_studio/frameworks/mxnet_onnx_ei/mxnet_onnx_ei.ipynb)
**Describe the bug**
Executing the cell below throws AttributeError
mx.test_utils.download(
"https://s3.amazonaws.com/onnx-model-zoo/resnet/resnet152v1/resnet152v1.onnx"
)
**To reproduce**
Run the first 3 cells in the notebook on AWS Sagemaker studio default instance ml.t3.medium
**Logs**
import mxnet as mx
mx.test_utils.download(
"https://s3.amazonaws.com/onnx-model-zoo/resnet/resnet152v1/resnet152v1.onnx"
)
/opt/conda/lib/python3.10/site-packages/mxnet/numpy/utils.py:37: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
bool = onp.bool
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[11], line 1
----> 1 import mxnet as mx
3 mx.test_utils.download(
4 "https://s3.amazonaws.com/onnx-model-zoo/resnet/resnet152v1/resnet152v1.onnx"
5 )
File /opt/conda/lib/python3.10/site-packages/mxnet/__init__.py:33
30 # version info
31 __version__ = base.__version__
---> 33 from . import contrib
34 from . import ndarray
35 from . import ndarray as nd
File /opt/conda/lib/python3.10/site-packages/mxnet/contrib/__init__.py:30
27 from . import autograd
28 from . import tensorboard
---> 30 from . import text
31 from . import onnx
32 from . import io
File /opt/conda/lib/python3.10/site-packages/mxnet/contrib/text/__init__.py:23
21 from . import utils
22 from . import vocab
---> 23 from . import embedding
File /opt/conda/lib/python3.10/site-packages/mxnet/contrib/text/embedding.py:36
34 from ... import base
35 from ...util import is_np_array
---> 36 from ... import numpy as _mx_np
37 from ... import numpy_extension as _mx_npx
40 def register(embedding_cls):
File /opt/conda/lib/python3.10/site-packages/mxnet/numpy/__init__.py:23
21 from . import random
22 from . import linalg
---> 23 from .multiarray import * # pylint: disable=wildcard-import
24 from . import _op
25 from . import _register
File /opt/conda/lib/python3.10/site-packages/mxnet/numpy/multiarray.py:47
45 from ..ndarray.numpy import _internal as _npi
46 from ..ndarray.ndarray import _storage_type, from_numpy
---> 47 from .utils import _get_np_op
48 from .fallback import * # pylint: disable=wildcard-import,unused-wildcard-import
49 from . import fallback
File /opt/conda/lib/python3.10/site-packages/mxnet/numpy/utils.py:37
35 int64 = onp.int64
36 bool_ = onp.bool_
---> 37 bool = onp.bool
39 pi = onp.pi
40 inf = onp.inf
File /opt/conda/lib/python3.10/site-packages/numpy/__init__.py:324, in __getattr__(attr)
319 warnings.warn(
320 f"In the future `np.{attr}` will be defined as the "
321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
323 if attr in __former_attrs__:
--> 324 raise AttributeError(__former_attrs__[attr])
326 if attr == 'testing':
327 import numpy.testing as testing
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Contributor guide
Assessment
This issue has not been assessed yet.