hi everyone, can we initiate multiple sessions in...
# questions
m
hi everyone, can we initiate multiple sessions in kedro? if yes, could anyone help me with it? kedro version - 0.18 i am building a web application where in i have to trigger the different pipelines of a kedro project based on button clicks on the dash ui. as of now, individually it is working, but when one session is running, if i tries to trigger another session it gives a runtime error.
K 1
n
Do you need to keep track of the session_id? If not you can try to use the lower level component such as
DataCatalog
,
Runner
without the Session. You will need to orchestrate them a little bit like this i.e.
Copy code
context = session.load_context()
catalog = context.catalog
runner = SequentialRunner()
runner.run(<pipeline>, catalog)
m
Thanks for this Nok. Let me look into it.
👍🏼 1
Hey @Nok Lam Chan, I was trying this, but have some doubts. can we connect for a short time to understand it better?
one more issue is i have to trigger a set of pipelines for each button clicks and these pipelines are mutually exclusive.
n
Can you share the questions here?
Or can you share what’s the approach you are thinking?
m
Hi @Nok Lam Chan Assuming one had to “_keep track of the session_id_”… What is the best way to do it ?
catalog._save_version
? Thx
m
hey @Nok Lam Chan, i ended up using multiprocessing instead.
👍🏼 1
n
Assuming one had to “_keep track of the session_id_”…
What is the best way to do it ?
catalog._save_version
?
session.session_id
. catalog.__save__version is relatively new change and it’s internal API that shouldn’t be relied on.
m
Thx @Nok Lam Chan Now that you say it, it just sounds completely obvious. I guess I just got lazy and since I had the catalog object available I used the
_save_version
attribute 😉 Thx again M