(model_metadata,  # type: Metadata or annotation config
               config = {},  # type: addtional config
               component_builder=None,  # type: Optional[ComponentBuilder]
               skip_valdation=False  # type: bool
               )
return Interpreter(pipeline, context, model_metadata)
Load stored model and components defined by the provided metadata.
Load stored model and components defined by the provided metadata.
Load stored model and components defined by the provided metadata .
def create(model_metadata,  # type: Metadata or annotation config
               config = {},  # type: addtional config
               component_builder=None,  # type: Optional[ComponentBuilder]
               skip_valdation=False  # type: bool
               ):
        # type: (...) -> Interpreter
        """Load stored model and components defined by the provided metadata."""
        context = {}
        if component_builder is None:
            # If no builder is passed, every interpreter creation will result
            # in a new builder. hence, no components are reused.
            component_builder = components.ComponentBuilder()
        pipeline = []
        # Before instantiating the component classes,
        # lets check if all required packages are available
        # if not skip_valdation:
        #     components.validate_requirements(model_metadata.pipeline)
        for component_name in model_metadata.pipeline:
            component = component_builder.load_component(
                component_name, model_metadata.model_meta_path,
                model_metadata, config=config, **context)
            try:
                updates = component.provide_context()
                if updates:
                    context.update(updates)
                pipeline.append(component)
            except components.MissingArgumentError as e:
                raise Exception("Failed to initialize component '{}'. "
                                "{}".format(component.name, e))
        return Interpreter(pipeline, context, model_metadata)
def create ( model_metadata , # type: Metadata or annotation config config = { } , # type: addtional config component_builder = None , # type: Optional[ComponentBuilder] skip_valdation = False # type: bool ) : # type: (...) -> Interpreter context = { } if component_builder is None : # If no builder is passed, every interpreter creation will result # in a new builder. hence, no components are reused. component_builder = components . ComponentBuilder ( ) pipeline = [ ] # Before instantiating the component classes, # lets check if all required packages are available # if not skip_valdation: #     components.validate_requirements(model_metadata.pipeline) for component_name in model_metadata . pipeline : component = component_builder . load_component ( component_name , model_metadata . model_meta_path , model_metadata , config = config , * * context ) try : updates = component . provide_context ( ) if updates : context . update ( updates ) pipeline . append ( component ) except components . MissingArgumentError as e : raise Exception ( "Failed to initialize component '{}'. " "{}" . format ( component . name , e ) ) return Interpreter ( pipeline , context , model_metadata )