7.2.9.3. load_map¶
-
load_map
(dsp, path)[source]¶ Load Dispatcher map in Python pickle format.
Parameters: - dsp (schedula.schedula.Dispatcher) – A dispatcher that identifies the model to be upgraded.
- path (str, file) – File or filename to write. File names ending in .gz or .bz2 will be uncompressed.
Example:
>>> from schedula import Dispatcher >>> dsp = Dispatcher() >>> dsp.add_function(function=max, inputs=['a', 'b'], outputs=['c']) 'max' >>> save_map(dsp, file_name) >>> dsp = Dispatcher() >>> load_map(dsp, file_name) >>> dsp.dispatch(inputs={'a': 1, 'b': 3})['c'] 3