Hi. I think numpy 1.24 release broke flytekit ```1...
# flytekit
Hi. I think numpy 1.24 release broke flytekit
Copy code
10:37:44.889  .tox/py38-test/lib/python3.8/site-packages/flytekit/__init__.py:195: in <module>
10:37:44.889      from flytekit.types import directory, file, numpy, schema
10:37:44.889  .tox/py38-test/lib/python3.8/site-packages/flytekit/types/schema/__init__.py:1: in <module>
10:37:44.889      from .types import (
10:37:44.889  .tox/py38-test/lib/python3.8/site-packages/flytekit/types/schema/types.py:314: in <module>
10:37:44.889      class FlyteSchemaTransformer(TypeTransformer[FlyteSchema]):
10:37:44.889  .tox/py38-test/lib/python3.8/site-packages/flytekit/types/schema/types.py:324: in FlyteSchemaTransformer
10:37:44.889      _np.bool: SchemaType.SchemaColumn.SchemaColumnType.BOOLEAN,  # type: ignore
10:37:44.889  .tox/py38-test/lib/python3.8/site-packages/numpy/__init__.py:284: in __getattr__
10:37:44.889      raise AttributeError("module {!r} has no attribute "
10:37:44.889  E   AttributeError: module 'numpy' has no attribute 'bool'
In numpy 1.24.0 release note:
Copy code
The deprecation for the aliases np.object, np.bool, np.float,
np.complex, np.str, and <http://np.int|np.int> is expired (introduces NumPy
1.20). Some of these will now give a FutureWarning in addition to
raising an error since they will be mapped to the NumPy scalars in
the future.
It seems we should just use
(and other built-in types) according to
Copy code
_msg = (
        "`np.{n}` is a deprecated alias for the builtin `{n}`. "
        "To silence this warning, use `{n}` by itself. Doing this will not "
        "modify any behavior and is safe. {extended_msg}\n"
        "Deprecated in NumPy 1.20; for more details and guidance: "
cc @Eduardo Apolinario (eapolinario)
yeah, I opened https://github.com/flyteorg/flyte/issues/3166 to track this last night.
will prioritize this. cc: @Yee
@honnix, flytekit 1.2.7 is out and fixes this problem. We also have a beta release (1.3.0b3) which contains a fix for this.
@Eduardo Apolinario (eapolinario) Thank you for fixing this. Sorry I did not realize 3166 is about this fix. I will close 3167.
no, thank you for noticing this, @honnix.
Hi everyone I'm trying to use this new version of flytekit, but when installing flytekitplugins-bigquery, it gives me an flyte version error. Is there a way to solve this issue?
@Victor Gustavo da Silva Oliveira, are you seeing the same numpy error? If not, let's follow up in a separate thread. It'd be great if you could share how you're seeing this (steps to repro, etc)