cellmap_flow.models.configs.script ================================== .. py:module:: cellmap_flow.models.configs.script .. autoapi-nested-parse:: ``ScriptModelConfig``: a model that a Python script defines. ``load_safe_config`` checks the script, runs it and returns its globals as a Config: the model (or a ``predict``) and its geometry. Sizes in voxels (``input_size``, ``output_size``) and shapes in nm (``read_shape``, ``write_shape``) are each derived from the other when only one is given. Attributes ---------- .. autoapisummary:: cellmap_flow.models.configs.script.logger Classes ------- .. autoapisummary:: cellmap_flow.models.configs.script.ScriptModelConfig Functions --------- .. autoapisummary:: cellmap_flow.models.configs.script.load_safe_config Module Contents --------------- .. py:data:: logger .. py:function:: load_safe_config(config_path, force_safe=None) Loads the configuration script at `config_path` after verifying its safety. If `force_safe` is True, raises an error if the script is deemed unsafe. When it is None, the FORCE_SAFE_CONFIG environment variable decides. .. py:class:: ScriptModelConfig(script_path, name=None, scale=None) .. py:attribute:: cli_name :value: 'script' .. py:attribute:: finetunable :value: True .. py:attribute:: script_path .. py:attribute:: name :value: None .. py:attribute:: scale :value: None .. py:method:: to_dict() This config as a model entry, which ``registry.build_model`` rebuilds.