-
Notifications
You must be signed in to change notification settings - Fork 903
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
KedroSession not working on packaged kedro project #1869
Comments
also followed the steps mentioned at #1583 |
@ajinkyachandulwar #1583 (comment) Have you tried this already? If so what error did u get? |
@noklam i followed the same steps mentioned in |
For packaged mode you will simply call the package.
|
But with this option i will not be getting the output of my pipeline as dataframe (as i am not using any catalog.yml). Also in kedro 0.17.7 kedrosession was working fine for me so why its not working in 0.18.2 ? |
The workaround to use In short, there is "package mode" and "project mode". However, I like the idea that I have made this issue and "Technical Design" ticket and hopefully we have some time to discuss this next week. |
Background for discussion - full background in #1423
My questions are, are they really different? Do we actually need two modes? So I purposed here Why not just let KedroSession works with package mode?
There are more to discuss, but these are the main issues directly related to this.
I think it's better to clear this up from the design perspective, as we don't have a good way to solve this, and This one is slightly off-topic, but why Edited on 28th Sep |
@ajinkyachandulwar Would this work for you for now? I think it will still take some time before #1423 is merged.
Can you try this snippet? from kedro.framework.session import KedroSession
from kedro.framework.project import configure_project
package_name = <your_package_name>
configure_project(package_name)
with KedroSession.create(package_name) as session:
session.run() |
Hi @ajinkyachandulwar , I'll close this issue for now, but feel free to re-open if you still need help solving it! |
Description
KedroSession giving error
ModuleNotFoundError: No module named 'None'
on kedro version 0.18.2And after using bootstrap_project() not able to find pipelines defined in another project.
Steps followed to use Kedrosession
https://kedro.readthedocs.io/en/0.18.2/kedro_project_setup/session.html
Context
I am trying to use the kedro pipelines defined in 1 of my kedro project (ProjectX). I am packaging ProjectX using kedro package and then install it using pip install.
Steps to Reproduce
kedro new
kedro package
Expected Result
Should execute pipeline1 and return the output dataframes.
Actual Result
Getting below error
354 │ │ try: │
│ 355 │ │ │ pipeline = pipelines[name] │
│ 356 │ │ except KeyError as exc: │
│ ❱ 357 │ │ │ raise ValueError( │
│ 358 │ │ │ │ f"Failed to find the pipeline named '{name}'. " │
│ 359 │ │ │ │ f"It needs to be generated and returned " │
│ 360 │ │ │ │ f"by the 'register_pipelines' function." │
│ │
│ ╭──────────────────────────────────────── locals ─────────────────────────────────────────╮ │
│ │ context = <kedro.framework.context.context.KedroContext object at 0x7f8f6b1d5d90> │ │
│ │ extra_params = {'param1': 'value1', 'param2': 'value2'} │ │
│ │ from_inputs = None │ │
│ │ from_nodes = None │ │
│ │ load_versions = None │ │
│ │ name = 'pipeline1' │ │
│ │ node_names = None │ │
│ │ pipeline_name = 'pipeline1' │ │
│ │ runner = None │ │
│ │ save_version = '2022-09-23T12.19.58.331Z' │ │
│ │ self = <kedro.framework.session.session.KedroSession object at 0x7f8f6b114b50> │ │
│ │ session_id = '2022-09-23T12.19.58.331Z' │ │
│ │ tags = None │ │
│ │ to_nodes = None │ │
│ │ to_outputs = None │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: Failed to find the pipeline named 'pipeline1'. It needs to be generated and returned by
the 'register_pipelines' function.
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
pip show kedro
orkedro -V
):Name: kedro
Version: 0.18.2
python -V
): Python 3.8.13The text was updated successfully, but these errors were encountered: