Skip to content

Commit

Permalink
Merge branch 'main' into dev/main
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoadesScholar authored Mar 18, 2024
2 parents ed44791 + 851e3bc commit 8471413
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ Currently, python>=3.10 is supported. We recommend creating a new conda environm
conda create -n dacapo python=3.10
```

Then clone this repository, go into the directory, and install:
Then install DaCapo using pip with the following command:
```
git clone [email protected]:janelia-cellmap/dacapo.git
cd dacapo
pip install .
pip install git+https://github.com/janelia-cellmap/dacapo
```
This will install the minimum required dependencies.

Expand Down
15 changes: 2 additions & 13 deletions dacapo/experiments/starts/cosem_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions dacapo/experiments/starts/cosem_start_config.py
Original file line number Diff line number Diff line change
@@ -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."})

0 comments on commit 8471413

Please sign in to comment.