From 12f68e9ce26cd19d2b2ca32270cc485580e31c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Gr=C3=A4tz?= Date: Sun, 16 Jun 2024 17:51:46 +0200 Subject: [PATCH 1/3] Replace deprecated np.string_ with np.bytes_ (alias) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio Grätz --- flytekit/types/schema/types.py | 2 +- flytekit/types/structured/structured_dataset.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytekit/types/schema/types.py b/flytekit/types/schema/types.py index 349b5aaf5a..75a54292c5 100644 --- a/flytekit/types/schema/types.py +++ b/flytekit/types/schema/types.py @@ -334,7 +334,7 @@ class FlyteSchemaTransformer(TypeTransformer[FlyteSchema]): datetime.datetime: SchemaType.SchemaColumn.SchemaColumnType.DATETIME, _np.timedelta64: SchemaType.SchemaColumn.SchemaColumnType.DURATION, datetime.timedelta: SchemaType.SchemaColumn.SchemaColumnType.DURATION, - _np.string_: SchemaType.SchemaColumn.SchemaColumnType.STRING, + _np.bytes_: SchemaType.SchemaColumn.SchemaColumnType.STRING, _np.str_: SchemaType.SchemaColumn.SchemaColumnType.STRING, _np.object_: SchemaType.SchemaColumn.SchemaColumnType.STRING, str: SchemaType.SchemaColumn.SchemaColumnType.STRING, diff --git a/flytekit/types/structured/structured_dataset.py b/flytekit/types/structured/structured_dataset.py index 1d2209a2b4..18e9eeb09a 100644 --- a/flytekit/types/structured/structured_dataset.py +++ b/flytekit/types/structured/structured_dataset.py @@ -340,7 +340,7 @@ def get_supported_types(): _datetime.datetime: type_models.LiteralType(simple=type_models.SimpleType.DATETIME), _np.timedelta64: type_models.LiteralType(simple=type_models.SimpleType.DURATION), _datetime.timedelta: type_models.LiteralType(simple=type_models.SimpleType.DURATION), - _np.string_: type_models.LiteralType(simple=type_models.SimpleType.STRING), + _np.bytes_: type_models.LiteralType(simple=type_models.SimpleType.STRING), _np.str_: type_models.LiteralType(simple=type_models.SimpleType.STRING), _np.object_: type_models.LiteralType(simple=type_models.SimpleType.STRING), str: type_models.LiteralType(simple=type_models.SimpleType.STRING), From 041c710e241566ab9e9b8ce82dd00e116eccfebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Gr=C3=A4tz?= Date: Sun, 16 Jun 2024 17:52:02 +0200 Subject: [PATCH 2/3] Make numpy an explicit dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio Grätz --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 5aece34595..350f660524 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,7 @@ dependencies = [ "marshmallow-enum", "marshmallow-jsonschema>=0.12.0", "mashumaro>=3.11", + "numpy", "protobuf!=4.25.0", "pyarrow", "pygments", From 3fbb2041d8d23151e4429168488ace59b91510c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Gr=C3=A4tz?= Date: Sun, 16 Jun 2024 18:13:31 +0200 Subject: [PATCH 3/3] Pin numpy to <2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio Grätz --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 350f660524..74a41ae422 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ "marshmallow-enum", "marshmallow-jsonschema>=0.12.0", "mashumaro>=3.11", - "numpy", + "numpy<2", "protobuf!=4.25.0", "pyarrow", "pygments",