-
Notifications
You must be signed in to change notification settings - Fork 909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate how session/context should be re-designed to work well for API use-cases #2182
Comments
Related discussion: #2169 (comment) |
I think this is related too, we need to document and understand what is the use case and what improvements we can make. There are some questions we want to ask.
Summary (To be updated)
|
Moving this to the Session milestone |
In light of the interest that @merelcht @rashidakanchwala I often hear that "the |
Can I please volunteer myself for a user interview on how my teams have approached this! |
Discussed in #2134
Originally posted by illia-shkroba December 16, 2022
Hello.
I'm trying to build RestAPI with FastAPI that runs Kedro Pipeline under the hood and come up with this solution:
session.run("math")
runs a simple pipeline that calculates a variance for the input:[1, 2, 3]
.The solution seems to work as expected, but it takes nearly 2.1 seconds to finish a request:
I've noticed that
session.load_context()
takes about 1 second to finish. Also I've found thatload_context()
is used bysession.run()
:It seems that
load_context()
is called twice during the request:get_context()
.session.run()
.I've tried to cache the result of
session.load_context()
like this:And by doing that I've decreased the request processing time to 1.06 seconds.
Do you have any suggestions on how I can further optimize the
session.run()
? Should I try a different approach with a plainDataCatalog
/SequentialRunner
? Or maybe Kedro's implementation ofload_context()
should be modified to use some caching?The text was updated successfully, but these errors were encountered: