Skip to content
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

Performance analysis and smart re-running of pipelines #2057

Open
merelcht opened this issue Nov 23, 2022 · 3 comments
Open

Performance analysis and smart re-running of pipelines #2057

merelcht opened this issue Nov 23, 2022 · 3 comments

Comments

@merelcht
Copy link
Member

Description

Kedro currently doesn't offer any options to analyse the performance of pipelines. Additionally, our users have flagged that they would like to be able to re-run only parts of their pipeline.

Implementation ideas

  • Stats on performance of pipelines
  • Record Kedro run metadata and use it for suggesting pipeline optimisations
  • Make Kedro run faster
  • Rerun Kedro Pipeline should be smarter. Only re-run necessary data "kedro run -xxx"

Questions

@noklam
Copy link
Contributor

noklam commented Nov 29, 2022

I think it's better to further split this into two issues, but I will leave my comments for both topics.

We have something like PipelineMonitoringHook in our docs. It requires some infrastructure and it's not easy to set up by regular users.

Pipeline Statistic

How would these pipeline stats be useful?

  1. Just having a summary of the statistic could be very useful to understanding the pipeline performance - instead of parsing the log by yourself
  2. In addition, we could add visualization on kedro-viz side to show where's the bottleneck and help user to optimize their pipeline
  3. The pipeline statistic could be useful for ParallelRunner or something similar. Currently, the workload is distributed naively, but not every node is equal.

Smarter way to re-run the pipeline

Similar to the Pipeline's run_only_missing, but a more sophisticated one. During development, it's common that you are working on one particular node and you just need to refresh one node(or a few dependent nodes). We can so some back-tracking.

Alternative

Currently, it requires users to figure out which nodes are not necessary, and do kedro run --from-nodes to skip unnecessary computation

Summary

One key realization of this change is that Run need to have memory. To optimize runtime performance, it needs to know how it is run previously. To re-run the pipeline in a smart way, it needs to know the previous run(s) and figure out what's the minimal computation.

@noklam
Copy link
Contributor

noklam commented Dec 2, 2022

@astrojuanlu
Copy link
Member

This is a very frequent question actually, will try to collect more evidence for it going forward.

There's different things when considering performance, namely (1) execution time, and (2) RAM usage. There are different tools for each of these purposes, so most likely we would need dedicated efforts.

I think execution time is probably the most urgent one. This is how I used pyinstrument #3033 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Discovery or Research - Later 🧪
Development

No branches or pull requests

3 participants