Open melvinkokxw opened 1 year ago
Hello @melvinkokxw, thanks for reporting the issue and sorry you had a bumpy upgrade.
As a workaround, are you able to add a .transformer
attribute or otherwise fix your SklearnTransform.__str__
representation?
Hey Juan! No worries, we understand that such problems are bound to occur when trying to integrate with old libraries 🥲
That would be viable workaround for us, thank you for the suggestion!
@astrojuanlu I didn't expect it traces thing more than the hook call itself, maybe worth to have a look again 👀 Throwing error in user code for a debug level log seems overkilled.
Yeah I agree, it might trigger undesirable side effects. Maybe a custom subclass of TagTracer
could do the trick:
The error occurs before calling the tracing function (logger.debug in our case).
@astrojuanlu Should we put this into backlog grooming? I think this tracing is too chatty and it take up more than 50% of my kedro run log.
I don't really want it showing the hooks DEBUG message when it's just telemetry.
Yes let's prioritize this issue. We have to try to strike a balance and find a way to keep the ability to debug hook execution I think.
Reported this upstream by the way https://github.com/pytest-dev/pluggy/issues/424
The pluggy maintainers are open to fixing this upstream 🎉 in terms of estimation though, this is more a 3 than a 1
Description
kedro run
fails if an object used in the run doesn't have__repr__
implemented properly. Seems to be caused by the addition of_cli_hook_manager.enable_tracing()
inkedro==0.18.9
: https://github.com/kedro-org/kedro/compare/0.18.8...0.18.9#diff-2547f8676f08bd22f65160f0f04f27ca730e0e3f49b8d9f44ec3c7edf387fc6eR23The same pipeline works on
0.18.8
, but breaks on0.18.9
.Our hypothesis is that when using node-related hooks, it tries to generate string representation of the node input/outputs due to
_cli_hook_manager.enable_tracing()
, and throws the error.Context
We were running a pipeline with a custom
scikit-learn
transformer.scikit-learn
version is very old (0.24.2) and is likely to be the reason why__repr__
wasn't working correctlySteps to Reproduce
__repr__
properly implementedafter_node_run
)Expected Result
Pipeline should run successfully
Actual Result
An error is thrown
Expand this for error message
``` 2023-06-01T11:06:49.1709611Z ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ 2023-06-01T11:06:49.1710506Z │ /home/vsts/work/1/s/venv/bin/kedro:8 inYour Environment