def from_yaml(cls, path: str) -> "Pipeline": """Creates a pipeline from a config yaml file Parameters ---------- path The path to a YAML configuration file Returns ------- pipeline A configured pipeline """ pipeline_configuration = PipelineConfiguration.from_yaml(path) return cls.from_config(pipeline_configuration)
def from_yaml(cls, path: str, vocab_path: Optional[str] = None) -> "Pipeline": """Creates a pipeline from a config yaml file Parameters ---------- path : `str` The path to a YAML configuration file vocab_path : `Optional[str]` If provided, the pipeline vocab will be loaded from this path Returns ------- pipeline: `Pipeline` A configured pipeline """ pipeline_configuration = PipelineConfiguration.from_yaml(path) return cls.from_config(pipeline_configuration, vocab_path=vocab_path)