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

Add documentation about correct usage of configure_project #3707

Merged
merged 6 commits into from
Jul 9, 2024

Conversation

noklam
Copy link
Contributor

@noklam noklam commented Mar 13, 2024

Description

Fix #3704. This is tricky to resolve just with the error message. If users are using Kedro with multiprocessing themselves, they need to handle logging and configure_project carefully. There are no public API that we provide for user.

Review Notes

The issue is discovered when we try to fix running kedro-viz with ParallelRunner. At the end we didn't fix the issue in kedro-viz, as it turns out to be quite tricky to implement hook that works with ParallelRunner. We don't have an working example so I didn't include anything in this PR.

The change adds explanation of the usage of configure_project, and try to give a pointer when people see this mysterious error message.

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
@astrojuanlu
Copy link
Member

@noklam Do you intend to keep working on this? Otherwise we can close the PR and properly groom the issue at some other time

Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
…com/kedro-org/kedro into noklam/create-documentation-of-3704

Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
@noklam noklam marked this pull request as ready for review July 9, 2024 11:52
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
@noklam
Copy link
Contributor Author

noklam commented Jul 9, 2024

@astrojuanlu I fixed the PR and is ready to be reviewed.

Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These docs look good, thanks @noklam !

...However, is there a chance we open an issue about the underlying problem? Maybe there's something we can do at the API level to make this easier to get right the first time.

Copy link
Member

@merelcht merelcht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

docs/source/kedro_project_setup/session.md Show resolved Hide resolved
@noklam
Copy link
Contributor Author

noklam commented Jul 9, 2024

...However, is there a chance we open an issue about the underlying problem? Maybe there's something we can do at the API level to make this easier to get right the first time.

@astrojuanlu I don't know exactly what the issue will be, we have some issues and discussion opened that is related to this problem. kedro-org/kedro-viz#1801 (comment)

The most concrete problem I had so far is "How to write a stateful hook that can run with ParallelRunner".

@noklam noklam merged commit 87e2f02 into main Jul 9, 2024
10 checks passed
@noklam noklam deleted the noklam/create-documentation-of-3704 branch July 9, 2024 12:56
@astrojuanlu
Copy link
Member

What I didn't fully understand is why configure_project or bootstrap_project break (or behave differently) under the ParallelRunner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create documentation of the usage of configure_project
3 participants