Laure Vancau
04/22/2024, 3:08 PMlong_params_strategy
parameter to tag
(kedro-mlflow==0.11.10 , kedro~=0.18.9)
As you can see, in our set-up, instead of going to set_tag, the parameter is sent to be logged as a parameter.
Do you have any idea as to why this is occurring?
Thank you in advance âșïžmarrrcin
04/22/2024, 3:41 PMlong_params_strategy
only applies if the parameters don't fit within the MAX_PARAM_VAL_LENGTH
Yolan Honoré-Rougé
04/23/2024, 7:00 AMmlflow.yml
? Kedro-mlflow long_params_strategy
only applies if logging as a parameter would raise an error (mostly because some backend do not support long string).
If you want to "force" not logging an input as a parameter you can create an arbitrary "YAMLDataset" in your catalog and move your parameters to this dataset.
If your long parameter is a dict
, you can use flatten_dict
key to split it into several small parametersLaure Vancau
04/23/2024, 11:26 AMMAX_PARAM_VAL_LENGTH
as the call to mlflow.log_param
returns an error message: INVALID_PARAMETER_VALUE Param value ... had length 620, which exceeded length limit of 500
Our expected output would be for this parameter be logged as a tag
as we have specified the long_parameter_strategy
. However, it gets sent to mlflow to be logged as a parameter, hence the error message.Laure Vancau
04/23/2024, 1:25 PMYolan Honoré-Rougé
04/23/2024, 8:39 PMparameters.yml
? a multiline string with triple quotes or a "normal" raw string ?
âą Can you create a minimal reproducible example with e.g. pandas-spaceflights starter?
âą Can you try to set a breakpoint / print statement in the hook to show str_value_length
and MAX_PARAM_VAL_LENGTH
?Yolan Honoré-Rougé
04/23/2024, 8:46 PMYolan Honoré-Rougé
04/23/2024, 8:59 PMYolan Honoré-Rougé
04/23/2024, 9:02 PMMLflowArtifactDataset
if you want to ensure logging in mlflow.
I accept PR if you want a fix be released fast!Laure Vancau
04/24/2024, 7:53 AM