Victor Gustavo da Silva Oliveira
02/07/2023, 1:44 PMVictor Gustavo da Silva Oliveira
02/07/2023, 6:00 PMNiels Bantilan
02/07/2023, 7:04 PMVictor Gustavo da Silva Oliveira
02/07/2023, 7:06 PMNiels Bantilan
02/07/2023, 7:08 PMNiels Bantilan
02/07/2023, 7:10 PMNiels Bantilan
02/07/2023, 7:10 PMVictor Gustavo da Silva Oliveira
02/07/2023, 7:13 PMNiels Bantilan
02/07/2023, 7:25 PMpip insatll gsutil
and flyte handles serialization/deserialization of data structures (including files and images) to and from the blob store.
what kind of metadata do you want to attach to the images?Victor Gustavo da Silva Oliveira
02/07/2023, 7:27 PMNiels Bantilan
02/07/2023, 7:31 PMdataclasses
to attach metadata to files (see custom python objects in docs):
from dataclasses import dataclass
from dataclasses_json import dataclass_json
from flytekit.types.file import PNGImageFile
@dataclass_json
@dataclass
class ImageWithMetadata:
"""
Example of a simple custom class that is modeled as a dataclass
"""
file: PNGImageFile
metadata: typing.Dict[str, str]
Niels Bantilan
02/07/2023, 7:32 PMImageWithMetadata
will behave like a regular dataclass, but Flyte will automatically handle writing to/reading from blobstore when it’s used in tasks and workflowsVictor Gustavo da Silva Oliveira
02/07/2023, 7:43 PMNiels Bantilan
02/07/2023, 7:57 PM