mattia.paterna
05/28/2024, 9:45 AMFile "/usr/local/lib/python3.10/dist-packages/kedro/framework/session/session.py", line 341, in run
pipeline = pipelines[name]
File "/usr/local/lib/python3.10/dist-packages/kedro/framework/project/__init__.py", line 142, in inner
self._load_data()
File "/usr/local/lib/python3.10/dist-packages/kedro/framework/project/__init__.py", line 187, in _load_data
project_pipelines = register_pipelines()
TypeError: register_pipelines() missing 1 required positional argument: 'context'
I have two pipeline run scenarios:
1. I run poetry run kedro run
from my local development environment: everything works as expected.
2. I run poetry run kedro <our-plugin> run
, which shifts and lifts the pipeline into Vertex AI pipelines, where every pipeline run is composed of jobs and every job triggers kedro run -e <env>--pipeline <pipeline> --nodes <node> --runner <runner>
: here is where I get the traceback as above.
The plain Kedro library is used.
Do you have any suggestion or hint?Jitendra Gundaniya
05/28/2024, 9:52 AMmattia.paterna
05/28/2024, 10:24 AMpython = ">=3.10,<3.11.0"
kedro = "^0.19.5"
The differences in the environment setup are only related to Vertex AI configuration, not Kedro configuration—they are the same.Artur Dobrogowski
05/28/2024, 10:35 AMArtur Dobrogowski
05/28/2024, 10:36 AMregister_pipelines
function - can you paste head of its definition here?mattia.paterna
05/28/2024, 10:49 AMdef register_pipelines() -> Dict[str, Pipeline]:
"""Register the project's pipelines.
Returns:
A mapping from pipeline names to ``Pipeline`` objects.
"""
return find_pipelines()
That is why I don't get why it's asking for an argument that is not defined in its signature.
I think the plugin is inspired from yours, though I've been using it for too little to know more about it. 🙂Ankita Katiyar
05/28/2024, 11:39 AMArtur Dobrogowski
05/28/2024, 12:04 PMdatajoely
05/28/2024, 12:12 PMdef register_pipelines(variable):
you could use a debugger to work out what’s being passed there?Artur Dobrogowski
05/28/2024, 12:19 PM@staticmethod
def _get_pipelines_registry_callable(pipelines_module: str) -> Any:
module_obj = importlib.import_module(pipelines_module)
register_pipelines = getattr(module_obj, "register_pipelines")
return register_pipelines
def _load_data(self) -> None:
"""Lazily read pipelines defined in the pipelines registry module."""
# If the pipelines dictionary has not been configured with a pipelines module
# or if data has been loaded
if self._pipelines_module is None or self._is_data_loaded:
return
register_pipelines = self._get_pipelines_registry_callable(
self._pipelines_module
)
project_pipelines = register_pipelines()
points to the correct method register_pipelines
mattia.paterna
05/29/2024, 7:32 AM