I need a good approach to declare a lot of variables over a context. For exmaple in kubeflow, I need declare a pipeline with a lot components in order to do that, I use the following code:
component_1_op = comp.load_component(
'path/to/component/1')
...
component_n_op = comp.load_component(
'path/to/component/n')
Because of our line length rules I need to use two lines to do that. Another option is the following:
components = [
["component_op", 'path/to/component/1'],
...,
["component_n_op", 'path/to/component/n']
]
components = {component: comp.load_component(path) for component, path in components}