Hello all, I have a run into a situation where I n...
# questions
r
Hello all, I have a run into a situation where I need to close the KedroSession from a node. Is there a way I can achieve that?
m
You "need"? Why?
j
indeed @rajat paliwal, if you tell us a bit about your use case, it will be easier for us to help
n
Version of Kedro?
r
Apologies for delay in reply. @Nok Lam Chan the kedro version is 0.18.7 . @marrrcin , @Juan Luis I mentioned "need" because its a unique case where a Kedro pipeline instantiated using kedro session need to be closed if a certain condition is true. I am running pipelines by instantiating the kedro session in a notebook . One way I can end the session is by closing the session in the notebook itself but I was hoping to do it from a node in order to keep the notebook clean from adding such conditions. Hope this provides the context behind my query. Happy to answer any other questions.
m
It seems to me like something might be wrong with your pipeline’s design if you need such behaviour 🤔 Anyway, you can just raise exception in a node and catch it above 🙂 (But it’s a really bad solution 🙈 🙈 🙈 )