astromodule.pipeline.Pipeline.map_run#
- Pipeline.map_run(key: str, array: Sequence[Any], workers: int = 2, validate: bool = True)[source]#
- Validates and executes all pipeline steps in a similar way to the - runmethod, but using multiprocessing. This method has a similar implementation to MapReduce [1], in which a function is applied to all elements of a vector. In this case, the function is the pipeline itself and the vector is specified by the- arrayparameter. Thus, the pipeline is executed- ntimes, where- nis the size of the- arrayvector. For each execution, the pipeline creates an storage output with identifier- keywhose value is the element of the vector that can be accessed via- PipelineStage.get_output.- Parameters:
- keystr
- The identifier for an element of - arraythat can be accessed by a pipeline stage using- PipelineStage.get_output.
- arraySequence[Any]
- The data that will be mapped to pipeline 
- workersint, optional
- The number of parallel proccesses that will be spawned, by default 2 
- validatebool, optional
- If - True, a pipeline requirements validation will be performed using- validatemethod. If- False, the validation will be skiped, by default True
 
- key
 - See also - astromodule.pipeline.Pipeline.run
- astromodule.pipeline.Pipeline.validate
- astromodule.pipeline.PipelineStage.get_output
 - References 
