Olivier Ho
07/05/2023, 2:49 PMNicolas Oulianov
07/06/2023, 8:01 AMFelipe Vianna
07/06/2023, 1:29 PMmy_param: ${my_param_in_globals.yml}
for some reason we can parse params like that just from base globals.yml. and when i try to get from live/globals.yml it’s not taken.Andrew Doherty
07/06/2023, 2:08 PMkedro=0.18.7
). When running from the CLI I would like to pass the location of the parameters file. From the documentation I believe I should be able to run:
kedro run --pipeline=namespace_1 --config=<config_file_name>.yml
However, when I run this I get KeyError: 'run'
(traceback in thread). Is there a way to use --config
with namespace pippelines?
The alternative is to create a copy of the conf
folder and use the following:
kedro run --pipeline=namespace_1 --conf-source=moved_params
This works but the first option where we only override the single parameter file would be much neater for our purpose.
Thanks again.Marc Gris
07/06/2023, 2:22 PMkedro jupyter notebook
to open notebooks directly in the IDE (vscode in my case) instead of in a browser ?
Thx
M.Marc Gris
07/06/2023, 3:26 PMParallelRunner
really only parallelize nodes, or does it actually also parallelize modular / namespace pipelines ?
Thx
MAndreas_Kokolantonakis
07/07/2023, 10:26 AMMathilde Lavacquery
07/07/2023, 12:11 PMregion
from raw file, and then I apply the same modular pipeline to each region, using namespace=region
def create_preprocess_modular_pipeline(region) -> Pipeline:
def filter_scope_node(raw_national):
return filter_scope(raw_national, region=region)
return pipeline(
[
node(
func=filter_scope_node,
inputs=["raw_national"],
outputs="scope_filtered",
),
]
)
def create_preprocess_pipeline(**kwargs) -> Pipeline:
regions = kwargs.get("regions")
preprocess_pipeline = Pipeline([])
for region in regions:
preprocess_pipeline += pipeline(
pipe=create_preprocess_modular_pipeline(region=region),
namespace=region,
# inputs for which we don't have namespaces
inputs={"raw_national": "raw_national"},
)
return preprocess_pipeline
Current behaviour: it seems that only the last region is used in filter_scope_node
for all regions (seems to be an instantiation problem of this node)
How can I pass dynamically my namespace to some nodes ?
How to dynamically instantiate this filter_scope_node ?
Michel van den Berg
07/07/2023, 1:50 PMEmilio Gagliardi
07/07/2023, 7:01 PMMichel van den Berg
07/08/2023, 6:57 AMEduardo Romero López
07/09/2023, 11:32 AMEduardo Romero López
07/09/2023, 11:33 AMJackson
07/10/2023, 9:10 AMValueError: Given configuration path either does not exist or is not a valid directory: /home/jackson/MASS_AIR_PIPELINE/conf/base
May I know if i missed something in my steps above? Shouldn't it locate the conf/base folder inside my airflow directory? FYI, /home/jackson/MASS_AIR_PIPELINE/ is the folder where I code all my kedro pipeline and /home/jackson/airflow is where i stored my airflow dags.Toni - TomTom - Madrid
07/10/2023, 9:28 AMAbhishek Bhatia
07/10/2023, 11:33 AMmy_multi_format_part_dataset:
type: PartitionedDataSet
path: "data/path/to/dataset"
dataset:
- type: pandas.CSVDataSet
load_args:
index_col: 0
save_args:
index: false
filename_suffix: ".csv"
- type: json.JSONDataSet
filename_suffix: ".json"
Olivier Ho
07/10/2023, 11:44 AMrequirements.txt
in the pipeline folders for each pipeline, however should we also copy those requirements in the global requirements.txt
in the src/project_name
folder? The issue here is that having pipeline specific dependencies duplication requires maintenance so I would like to keep the dependencies in their specific folders and have a single command to install all project & pipeline dependencies.Marc Gris
07/10/2023, 4:21 PM.venv_model_*a*/bin/python -m kedro run --tags=model_*a*
then
.venv_model_*b*/bin/python -m kedro run --tags=model_*b*
etc..
But, this, IMHO, is really far from an optimal “dev-confort-centric” workflow…
Hence my initial request / question:
Would there be some mechanisms that could allow passing a path to a venv when creating a node / pipeline ?
(I must confess that, in my naïveté, I though that this would be “quite easy” using a before_node_run
callback… But, I quickly had to reckon that my skills were too meager for the task 😅 )
Many thanks in advance for taking the time to consider this suggestion / request.
Regards
MarcMichel van den Berg
07/11/2023, 1:48 PMJose Nuñez
07/11/2023, 4:23 PMkedro viz
I'm getting this error:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/bin/kedro:8 in <module> │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/kedro/framework │
│ /cli/cli.py:211 in main │
│ │
│ 208 │ """ │
│ 209 │ _init_plugins() │
│ 210 │ cli_collection = KedroCLI(project_path=Path.cwd()) │
│ ❱ 211 │ cli_collection() │
│ 212 │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/click/core.py:1 │
│ 130 in __call__ │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/kedro/framework │
│ /cli/cli.py:139 in main │
│ │
│ 136 │ │ ) │
│ 137 │ │ │
│ 138 │ │ try: │
│ ❱ 139 │ │ │ super().main( │
│ 140 │ │ │ │ args=args, │
│ 141 │ │ │ │ prog_name=prog_name, │
│ 142 │ │ │ │ complete_var=complete_var, │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/click/core.py:1 │
│ 055 in main │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/click/core.py:1 │
│ 657 in invoke │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/click/core.py:1 │
│ 404 in invoke │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/click/core.py:7 │
│ 60 in invoke │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/kedro_viz/launc │
│ hers/cli.py:86 in viz │
│ │
│ 83 # pylint: disable=import-outside-toplevel, too-many-locals │
│ 84 def viz(host, port, browser, load_file, save_file, pipeline, env, autoreload, params): │
│ 85 │ """Visualise a Kedro pipeline using Kedro viz.""" │
│ ❱ 86 │ from kedro_viz.server import is_localhost, run_server │
│ 87 │ │
│ 88 │ installed_version = VersionInfo.parse(__version__) │
│ 89 │ latest_version = get_latest_version() │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/kedro_viz/serve │
│ r.py:13 in <module> │
│ │
│ 10 from kedro.pipeline import Pipeline │
│ 11 from watchgod import run_process │
│ 12 │
│ ❱ 13 from kedro_viz.api import apps │
│ 14 from kedro_viz.api.rest.responses import EnhancedORJSONResponse, get_default_response │
│ 15 from kedro_viz.constants import DEFAULT_HOST, DEFAULT_PORT │
│ 16 from kedro_viz.data_access import DataAccessManager, data_access_manager │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/kedro_viz/api/a │
│ pps.py:16 in <module> │
│ │
│ 13 from jinja2 import Environment, FileSystemLoader │
│ 14 │
│ 15 from kedro_viz import __version__ │
│ ❱ 16 from kedro_viz.api.rest.responses import EnhancedORJSONResponse │
│ 17 from kedro_viz.integrations.kedro import telemetry as kedro_telemetry │
│ 18 │
│ 19 from .graphql.router import router as graphql_router │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/kedro_viz/api/r │
│ est/responses.py:10 in <module> │
│ │
│ 7 from fastapi.responses import ORJSONResponse │
│ 8 from pydantic import BaseModel │
│ 9 │
│ ❱ 10 from kedro_viz.data_access import data_access_manager │
│ 11 │
│ 12 │
│ 13 class APIErrorMessage(BaseModel): │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/kedro_viz/data_ │
│ access/__init__.py:2 in <module> │
│ │
│ 1 """`kedro_viz.data_access` provides an interface to save and load data for viz backend." │
│ ❱ 2 from .managers import DataAccessManager │
│ 3 │
│ 4 data_access_manager = DataAccessManager() │
│ 5 │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/kedro_viz/data_ │
│ access/managers.py:15 in <module> │
│ │
│ 12 from sqlalchemy.orm import sessionmaker │
│ 13 │
│ 14 from kedro_viz.constants import DEFAULT_REGISTERED_PIPELINE_ID, ROOT_MODULAR_PIPELINE_ID │
│ ❱ 15 from kedro_viz.models.flowchart import ( │
│ 16 │ DataNode, │
│ 17 │ GraphEdge, │
│ 18 │ GraphNode, │
│ │
│ /Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/kedro_viz/model │
│ s/flowchart.py:14 in <module> │
│ │
│ 11 from typing import Any, Dict, List, Optional, Set, Union, cast │
│ 12 │
│ 13 from <http://kedro.io|kedro.io> import AbstractDataSet │
│ ❱ 14 from kedro.io.core import DatasetError │
│ 15 from kedro.pipeline.node import Node as KedroNode │
│ 16 from kedro.pipeline.pipeline import TRANSCODING_SEPARATOR, _strip_transcoding │
│ 17 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: cannot import name 'DatasetError' from 'kedro.io.core' (/Users/jose_darnott/opt/miniconda3/envs/planta-litio/lib/python3.8/site-packages/kedro/io/core.py)
Any ideas on what the problem may be? thanks!Erwin
07/11/2023, 7:03 PMschema.py
file? Or define the schema directly in nodes.py
?
I would greatly appreciate any help or suggestions you can offer. Thank you!Esteban Obando
07/11/2023, 9:36 PMEsteban Obando
07/11/2023, 9:36 PMEsteban Obando
07/11/2023, 9:37 PM---------------------------------------------------------------------------
Exit Traceback (most recent call last)
File /databricks/python/lib/python3.10/site-packages/click/core.py:1063, in BaseCommand.main(self, args, prog_name, complete_var, standalone_mode, windows_expand_args, **extra)
1056 # it's not safe to `ctx.exit(rv)` here!
1057 # note that `rv` may actually contain data like "1" which
1058 # has obvious effects
(...)
1061 # even always obvious that `rv` indicates success/failure
1062 # by its truthiness/falsiness
-> 1063 ctx.exit()
1064 except (EOFError, KeyboardInterrupt):
File /databricks/python/lib/python3.10/site-packages/click/core.py:681, in Context.exit(self, code)
680 """Exits the application with a given exit code."""
--> 681 raise Exit(code)
Exit: 0
During handling of the above exception, another exception occurred:
SystemExit Traceback (most recent call last)
[... skipping hidden 1 frame]
File <command-991559434375355>:41
39 params_string = ','.join(list_params)
---> 41 main(
42 [
43 "--env", conf,
44 "--pipeline", pipeline,
45 f"--params={params_string}"
46 ]
47 ) # o
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-2abca7aa-105b-47df-bf33-dd90d478d3bc/lib/python3.10/site-packages/encounter_kedro/__main__.py:47, in main(*args, **kwargs)
46 run = _find_run_command(package_name)
---> 47 run(*args, **kwargs)
File /databricks/python/lib/python3.10/site-packages/click/core.py:1128, in BaseCommand.__call__(self, *args, **kwargs)
1127 """Alias for :meth:`main`."""
-> 1128 return self.main(*args, **kwargs)
File /databricks/python/lib/python3.10/site-packages/click/core.py:1081, in BaseCommand.main(self, args, prog_name, complete_var, standalone_mode, windows_expand_args, **extra)
1080 if standalone_mode:
-> 1081 sys.exit(e.exit_code)
1082 else:
1083 # in non-standalone mode, return the exit code
1084 # note that this is only reached if `self.invoke` above raises
(...)
1089 # `ctx.exit(1)` and to `return 1`, the caller won't be able to
1090 # tell the difference between the two
SystemExit: 0
During handling of the above exception, another exception occurred:
AssertionError Traceback (most recent call last)
[... skipping hidden 1 frame]
File /databricks/python/lib/python3.10/site-packages/IPython/core/interactiveshell.py:2047, in InteractiveShell.showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code)
2044 if exception_only:
2045 stb = ['An exception has occurred, use %tb to see '
2046 'the full traceback.\n']
-> 2047 stb.extend(self.InteractiveTB.get_exception_only(etype,
2048 value))
2049 else:
2050 try:
2051 # Exception classes can customise their traceback - we
2052 # use this in IPython.parallel for exceptions occurring
2053 # in the engines. This should return a list of strings.
File /databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py:585, in ListTB.get_exception_only(self, etype, value)
577 def get_exception_only(self, etype, value):
578 """Only print the exception type and message, without a traceback.
579
580 Parameters
(...)
583 value : exception value
584 """
--> 585 return ListTB.structured_traceback(self, etype, value)
File /databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py:452, in ListTB.structured_traceback(self, etype, evalue, etb, tb_offset, context)
449 chained_exc_ids.add(id(exception[1]))
450 chained_exceptions_tb_offset = 0
451 out_list = (
--> 452 self.structured_traceback(
453 etype, evalue, (etb, chained_exc_ids),
454 chained_exceptions_tb_offset, context)
455 + chained_exception_message
456 + out_list)
458 return out_list
File /databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py:1118, in AutoFormattedTB.structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
1116 else:
1117 self.tb = tb
-> 1118 return FormattedTB.structured_traceback(
1119 self, etype, value, tb, tb_offset, number_of_lines_of_context)
File /databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py:1012, in FormattedTB.structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
1009 mode = self.mode
1010 if mode in self.verbose_modes:
1011 # Verbose modes need a full traceback
-> 1012 return VerboseTB.structured_traceback(
1013 self, etype, value, tb, tb_offset, number_of_lines_of_context
1014 )
1015 elif mode == 'Minimal':
1016 return ListTB.get_exception_only(self, etype, value)
File /databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py:865, in VerboseTB.structured_traceback(self, etype, evalue, etb, tb_offset, number_of_lines_of_context)
856 def structured_traceback(
857 self,
858 etype: type,
(...)
862 number_of_lines_of_context: int = 5,
863 ):
864 """Return a nice text document describing the traceback."""
--> 865 formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
866 tb_offset)
868 colors = self.Colors # just a shorthand + quicker name lookup
869 colorsnormal = colors.Normal # used a lot
File /databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py:799, in VerboseTB.format_exception_as_a_whole(self, etype, evalue, etb, number_of_lines_of_context, tb_offset)
796 assert isinstance(tb_offset, int)
797 head = self.prepare_header(etype, self.long_header)
798 records = (
--> 799 self.get_records(etb, number_of_lines_of_context, tb_offset) if etb else []
800 )
802 frames = []
803 skipped = 0
File /databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py:854, in VerboseTB.get_records(self, etb, number_of_lines_of_context, tb_offset)
848 formatter = None
849 options = stack_data.Options(
850 before=before,
851 after=after,
852 pygments_formatter=formatter,
853 )
--> 854 return list(stack_data.FrameInfo.stack_data(etb, options=options))[tb_offset:]
File /databricks/python/lib/python3.10/site-packages/stack_data/core.py:578, in FrameInfo.stack_data(cls, frame_or_tb, options, collapse_repeated_frames)
562 @classmethod
563 def stack_data(
564 cls,
(...)
568 collapse_repeated_frames: bool = True
569 ) -> Iterator[Union['FrameInfo', RepeatedFrames]]:
570 """
571 An iterator of FrameInfo and RepeatedFrames objects representing
572 a full traceback or stack. Similar consecutive frames are collapsed into RepeatedFrames
(...)
576 and optionally an Options object to configure.
577 """
--> 578 stack = list(iter_stack(frame_or_tb))
580 # Reverse the stack from a frame so that it's in the same order
581 # as the order from a traceback, which is the order of a printed
582 # traceback when read top to bottom (most recent call last)
583 if is_frame(frame_or_tb):
File /databricks/python/lib/python3.10/site-packages/stack_data/utils.py:97, in iter_stack(frame_or_tb)
95 while frame_or_tb:
96 yield frame_or_tb
---> 97 if is_frame(frame_or_tb):
98 frame_or_tb = frame_or_tb.f_back
99 else:
File /databricks/python/lib/python3.10/site-packages/stack_data/utils.py:90, in is_frame(frame_or_tb)
89 def is_frame(frame_or_tb: Union[FrameType, TracebackType]) -> bool:
---> 90 assert_(isinstance(frame_or_tb, (types.FrameType, types.TracebackType)))
91 return isinstance(frame_or_tb, (types.FrameType,))
File /databricks/python/lib/python3.10/site-packages/stack_data/utils.py:176, in assert_(condition, error)
174 if isinstance(error, str):
175 error = AssertionError(error)
--> 176 raise error
J. Camilo V. Tieck
07/11/2023, 10:49 PMAdith George
07/12/2023, 6:45 AMreload_kedro("../../../", env="base", extra_params=extra_params)
with KedroSession.create(project_path="../", env="base", extra_params=extra_params) as session:
session.run(pipeline_name="kedro_pipeline_name")
It runs a kedro session with the input parameters.
Is there a way the kedro pipeline can return params/value back to the databricks notebooks?
something similar to a return
statement.Zemeio
07/12/2023, 9:35 AMEduardo Romero López
07/12/2023, 12:36 PMDatasetError: Failed while saving data to data set
PlotlyDataSet(filepath=C:/Users/eromero/Documents/Proyectos_bilbomatica_altia/0020004_Soporte_Analitica_Avanzada_e_Inte
ligencia_Artificial_dedalo_altia/componentes-IA-Altia-git/kedro/queres/data/08_reporting/plotly_express_reclamaciones_p
or_fecha.json, load_args={}, plotly_args={'fig': {'orientation': h, 'x': fecha, 'y': numero}, 'type': line},
protocol=file, save_args={}).
Value of 'x' is not the name of a column in 'data_frame'. Expected one of [0] but received: fecha
Eduardo Romero López
07/12/2023, 12:36 PM