nutritious-match-70820
03/06/2025, 12:04 PMcareful-australia-19356
03/10/2025, 4:10 PMnutritious-match-70820
03/17/2025, 2:30 PMnutritious-match-70820
03/31/2025, 12:46 PMcrooked-lifeguard-46802
05/12/2025, 1:10 PMflytekit==1.15.3
freezing-airport-6809
crooked-lifeguard-46802
05/12/2025, 1:29 PMmodel_type
is an Enum type, and the value should be card_cashing
but its getting exploded into a list/iterable for some reason 🤔crooked-lifeguard-46802
05/12/2025, 1:30 PMdo you know if this happens with pydanticWe don’t have any pydantic dataclasses in our codebase currently
freezing-airport-6809
damp-lion-88352
05/12/2025, 1:36 PMcrooked-lifeguard-46802
05/12/2025, 1:36 PMOptional[str]
as well 😬
Here’s the interface for this input:
start_date: {"type":{"unionType":{"variants":[{"structure":{"dataclassType":{},"tag":"str"},"simple":"STRING"},{"structure":{"dataclassType":{},"tag":"none"},"simple":"NONE"}]}}}
crooked-lifeguard-46802
05/12/2025, 1:40 PMcan you help me try dict with type hints?@damp-lion-88352 was this for me? (we are not currently using untyped dicts in our workflow)
damp-lion-88352
05/12/2025, 1:41 PMcrooked-lifeguard-46802
05/12/2025, 1:41 PMFLYTE_USE_OLD_DC_FORMAT=true
and didn’t see cache misses btw
• hard to say with certainity if this is a proper fix due to the non-deterministic nature of the bug!damp-lion-88352
05/12/2025, 1:42 PMdamp-lion-88352
05/12/2025, 1:43 PMdamp-lion-88352
05/12/2025, 1:43 PMdamp-lion-88352
05/12/2025, 1:43 PMdamp-lion-88352
05/12/2025, 1:44 PMFLYTE_USE_OLD_DC_FORMAT=true
in console is a good way to hit cachedamp-lion-88352
05/12/2025, 1:44 PMcrooked-lifeguard-46802
05/12/2025, 1:46 PMso javascript doesn’t have integer, only float
but our console is built by javascript
so when you use int in dict, we will miss the cacheI don’t know much about flyte internals, but I would assume that flyte doesn’t really use javascript for the actual serde logic? I always thought that the javascript is only used to display the human-readable representation on the task input/output, and the serde is handled within python + go?
damp-lion-88352
05/12/2025, 1:47 PMcrooked-lifeguard-46802
05/12/2025, 1:50 PMgentle-night-59824
05/12/2025, 5:02 PMtag_name
we were searching the database for was different from what the first execution that generated the cache we should've used, but wasn't sure where to go from there, perhaps testing flyte's tag generation logic locally on these inputs?damp-lion-88352
05/13/2025, 8:27 AMdamp-lion-88352
05/13/2025, 8:28 AMthe first execution that generated the cachethis will generate cache for msgpack idl inputs which includes integer but when you input from frontend, you will generate msgpack idl inputs which doesn't include integer
damp-lion-88352
05/13/2025, 8:29 AMdef return_input(dc: DC) -> DC
return dc
damp-lion-88352
05/13/2025, 8:29 AMreturn_input
taskdamp-lion-88352
05/13/2025, 8:30 AMFLYTE_USE_OLD_DC_FORMAT=true
to launch task in your user client and frontend
so that we will all use json str to cachethankful-minister-83577
crooked-lifeguard-46802
05/13/2025, 4:51 PMexperiment_id = baseline candidate
• Rest of the inputs all generated from tasks so there is no javascript round-trip (basically we already have def return_input(dc: DC) -> DC
type tasks that generates the inputs for our tasks that we are seeing unexpected cache misses on)
Could you point me to where is the hashed value of the cache inputs is computed? Is it computed in python or somewhere else?damp-lion-88352
05/16/2025, 8:50 AMfrom flytekit import task, workflow
from flytekit.core.cache import Cache
@task(cache=Cache(version="hard-coded",serialize=True))
def generic_task_no_params(dataset: str) -> str:
return dataset
@task(cache=Cache(version="hard-coded",serialize=True))
def generic_task(dataset: str, params: dict) -> str:
return dataset
@workflow
def generic_wf(dataset: str, params: dict) -> None:
generic_task_no_params(dataset=dataset) # caching works
generic_task(dataset=dataset, params=params) # no caching
and when (second time) I triggered the workflow in the console, it doesn't hit the cache at the first time (producing struct protobuf in the literal
but when I triggerd again in the console, it will hit the cache heredamp-lion-88352
05/16/2025, 8:51 AMdict
)damp-lion-88352
05/16/2025, 8:57 AMdamp-lion-88352
05/16/2025, 9:04 AMdamp-lion-88352
05/16/2025, 9:26 AMdamp-lion-88352
05/16/2025, 9:27 AMdamp-lion-88352
05/16/2025, 9:38 AMflyte=# SELECT * FROM artifact_data LIMIT 1;
created_at | updated_at | deleted_at | dataset_project | dataset_name | dataset_domain | dataset_version | artifact_id | name | location
-------------------------------+-------------------------------+------------+-----------------+-------------------------------------------+----------------+------------------------------+--------------------------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2025-05-16 08:43:57.795506+00 | 2025-05-16 08:43:57.795506+00 | | flytesnacks | flyte_task-example.generic_task_no_params | development | hard-coded-x3LhCJG8-zCZxwZgs | e09aecc8-8703-447b-b469-5cdd8426b9cf | o0 | <s3://my-s3-bucket/metadata/flytesnacks/development/flyte_task-example.generic_task_no_params/hard-coded-x3LhCJG8-zCZxwZgs/e09aecc8-8703-447b-b469-5cdd8426b9cf/o0/data.pb>
(1 row)