diff --git a/dacapo/experiments/starts/cosem_start.py b/dacapo/experiments/starts/cosem_start.py index d8dd8f8af..f871cc0bc 100644 --- a/dacapo/experiments/starts/cosem_start.py +++ b/dacapo/experiments/starts/cosem_start.py @@ -7,21 +7,10 @@ logger = logging.getLogger(__file__) -def format_name(name): - if "/" in name: - run, criterion = name.split("/") - return run, criterion - else: - raise ValueError( - f"Invalid starter name format {name}. Must be in the format run/criterion" - ) - - class CosemStart(Start): def __init__(self, start_config): - run, criterion = format_name(start_config.name) - self.name = start_config.name - super().__init__(run, criterion) + self.name = f"{self.run}/{self.criterion}" + super().__init__(start_config) def initialize_weights(self, model): from dacapo.store.create_store import create_weights_store diff --git a/dacapo/experiments/starts/cosem_start_config.py b/dacapo/experiments/starts/cosem_start_config.py index bd1a9014f..de16477b1 100644 --- a/dacapo/experiments/starts/cosem_start_config.py +++ b/dacapo/experiments/starts/cosem_start_config.py @@ -1,14 +1,13 @@ import attr from .cosem_start import CosemStart +from .start_config import StartConfig @attr.s -class CosemStartConfig: +class CosemStartConfig(StartConfig): """Starter for COSEM pretained models. This is a subclass of `StartConfig` and should be used to initialize the model with pretrained weights from a previous run. """ start_type = CosemStart - - name: str = attr.ib(metadata={"help_text": "The COSEM checkpoint name to use."})