From 4515e3160fdfb71ea5ae0c2b8165dc67db289c9e Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Fri, 22 Nov 2024 00:38:56 +0800 Subject: [PATCH] nit Signed-off-by: Future-Outlier --- docs/user_guide/data_types_and_io/dataclass.md | 11 ++--------- .../data_types_and_io/pydantic_basemodel.md | 3 +-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/docs/user_guide/data_types_and_io/dataclass.md b/docs/user_guide/data_types_and_io/dataclass.md index f2f5b3f8a4..462ba7da3a 100644 --- a/docs/user_guide/data_types_and_io/dataclass.md +++ b/docs/user_guide/data_types_and_io/dataclass.md @@ -16,23 +16,16 @@ serialization format for dataclasses, overcoming a major limitation of serializa to store `int` types, Protobuf's `struct` converts them to `float`, forcing users to write boilerplate code to work around this issue. - -:::{important} -If you're serializing dataclasses using `flytekit` version >= v1.14.0, and you want to produce Protobuf `struct -literal` instead, you can set environment variable `FLYTE_USE_OLD_DC_FORMAT` to `true`. -::: - - :::{important} If you're using Flytekit version < v1.11.1, you will need to add `from dataclasses_json import dataclass_json` to your imports and decorate your dataclass with `@dataclass_json`. ::: :::{important} -Flytekit version < v1.14.0 will produce protobuf struct literal for dataclasses. +Flytekit version < v1.14.0 will produce protobuf `struct` literal for dataclasses. Flytekit version >= v1.14.0 will produce msgpack bytes literal for dataclasses. -If you're using Flytekit version >= v1.14.0 and you want to produce protobuf struct literal for dataclasses, you can +If you're using Flytekit version >= v1.14.0 and you want to produce protobuf `struct` literal for dataclasses, you can set environment variable `FLYTE_USE_OLD_DC_FORMAT` to `true`. For more details, you can refer the MSGPACK IDL RFC: https://github.com/flyteorg/flyte/blob/master/rfc/system/5741-binary-idl-with-message-pack.md diff --git a/docs/user_guide/data_types_and_io/pydantic_basemodel.md b/docs/user_guide/data_types_and_io/pydantic_basemodel.md index e0899bd649..be40672534 100644 --- a/docs/user_guide/data_types_and_io/pydantic_basemodel.md +++ b/docs/user_guide/data_types_and_io/pydantic_basemodel.md @@ -18,10 +18,9 @@ overcoming a major limitation of serialization into a JSON string within a Proto to store `int` types, Protobuf's `struct` converts them to `float`, forcing users to write boilerplate code to work around this issue. - :::{important} By default, `flytekit >= 1.14` will produce `msgpack` bytes literals when serializing, preserving the types defined in your `BaseModel` class. -If you're serializing `BaseModel` using `flytekit` version >= v1.14.0 and you want to produce Protobuf `struct literal` instead, you can set environment variable `FLYTE_USE_OLD_DC_FORMAT` to `true`. +If you're serializing `BaseModel` using `flytekit` version >= v1.14.0 and you want to produce Protobuf `struct` literal instead, you can set environment variable `FLYTE_USE_OLD_DC_FORMAT` to `true`. For more details, you can refer the MESSAGEPACK IDL RFC: https://github.com/flyteorg/flyte/blob/master/rfc/system/5741-binary-idl-with-message-pack.md :::