def from_meta(meta: dict, **kwargs): cls = str_to_type(meta['class_path']) component = load_from_meta(meta['component']) return cls(component, meta['input_key'], meta['output_key'])
def from_meta(meta: Union[dict, str], **kwargs): if isinstance(meta, str): meta = load_json(meta) return Pipeline(*[load_from_meta(pipe) for pipe in meta['pipes']])