From 804dae1e9ba8cb8060c919b4bde7421db41bc20d Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Fri, 1 Nov 2024 16:35:32 -0400 Subject: [PATCH] Default nb task resolver msg (#2889) * add additional info to default notebook task resolver Signed-off-by: Niels Bantilan * add object repr to error message Signed-off-by: Niels Bantilan * update string Signed-off-by: Niels Bantilan --------- Signed-off-by: Niels Bantilan --- flytekit/core/python_auto_container.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flytekit/core/python_auto_container.py b/flytekit/core/python_auto_container.py index f0163cdbf1..dfbd678fb6 100644 --- a/flytekit/core/python_auto_container.py +++ b/flytekit/core/python_auto_container.py @@ -339,7 +339,8 @@ def load_task(self, loader_args: List[str]) -> PythonAutoContainerTask: # verify the loaded_data is of the correct type if not isinstance(loaded_data, PickledEntity): raise RuntimeError( - "The loaded data is not of the correct type. Please ensure that the pickle file is not corrupted." + f"The loaded data is not of the correct type. Expected PickledEntity, found {type(loaded_data)}. " + f"Please ensure that the pickle file is not corrupted. Loaded data: {loaded_data}" ) pickled_object: PickledEntity = loaded_data