Skip to content

Commit

Permalink
use checkpoint path instead of folder
Browse files Browse the repository at this point in the history
  • Loading branch information
mzouink committed Mar 17, 2024
1 parent bf1acfa commit 40b9b57
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cellmap_models/pytorch/cosem/load_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from cellmap_models import download_url_to_file


def download_checkpoint(checkpoint_name: str, local_folder: Path):
def download_checkpoint(checkpoint_name: str, checkpoint_path: Path):
"""
download models checkpoint from s3 bucket.
Expand All @@ -20,9 +20,6 @@ def download_checkpoint(checkpoint_name: str, local_folder: Path):
f"Checkpoint {checkpoint_name} not found. Available checkpoints: {models_list}"
)

checkpoint_path = Path(
local_folder / Path(checkpoint_name.replace(".", "_"))
).with_suffix(".pth")
if not checkpoint_path.exists():
url = models_dict[checkpoint_name]
print(f"Downloading {checkpoint_name} from {url}")
Expand Down

0 comments on commit 40b9b57

Please sign in to comment.