cellmap_flow.models.configs.script

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

logger

Classes

ScriptModelConfig

Functions

load_safe_config(config_path[, force_safe])

Loads the configuration script at config_path after verifying its safety.

Module Contents

cellmap_flow.models.configs.script.logger
cellmap_flow.models.configs.script.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.

class cellmap_flow.models.configs.script.ScriptModelConfig(script_path, name=None, scale=None)
cli_name = 'script'
finetunable = True
script_path
name = None
scale = None
to_dict()

This config as a model entry, which registry.build_model rebuilds.