Skip to content

Commit

Permalink
Merge pull request #209 from computational-cell-analytics/fix-precompute
Browse files Browse the repository at this point in the history
Fix CLI for embedding precomputation
  • Loading branch information
constantinpape authored Sep 25, 2023
2 parents 66165b6 + 8a577d4 commit 1c4ffba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions micro_sam/precompute_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def precompute_state(
model_type: str = util._DEFAULT_MODEL,
checkpoint_path: Optional[Union[os.PathLike, str]] = None,
key: Optional[str] = None,
ndim: Union[int] = None,
ndim: Optional[int] = None,
tile_shape: Optional[Tuple[int, int]] = None,
halo: Optional[Tuple[int, int]] = None,
precompute_amg_state: bool = False,
Expand Down Expand Up @@ -158,8 +158,8 @@ def main():
parser.add_argument(
"--halo", nargs="+", type=int, help="The halo for using tiled prediction", default=None
)
parser.add_argument("-n", "--ndim")
parser.add_argument("-p", "--precompute_amg_state")
parser.add_argument("-n", "--ndim", type=int)
parser.add_argument("-p", "--precompute_amg_state", action="store_true")

args = parser.parse_args()
precompute_state(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ console_scripts =
micro_sam.annotator_3d = micro_sam.sam_annotator.annotator_3d:main
micro_sam.annotator_tracking = micro_sam.sam_annotator.annotator_tracking:main
micro_sam.image_series_annotator = micro_sam.sam_annotator.image_series_annotator:main
micro_sam.precompute_embeddings = micro_sam.util:main
micro_sam.precompute_embeddings = micro_sam.precompute_state:main

# make sure it gets included in your package
[options.package_data]
Expand Down

0 comments on commit 1c4ffba

Please sign in to comment.