Skip to content

Commit

Permalink
Merge pull request #3 from janelia-cellmap/rhoadesScholar-patch-1
Browse files Browse the repository at this point in the history
Update tests.yaml
  • Loading branch information
rhoadesScholar authored Mar 14, 2024
2 parents 94e2ff2 + cda5681 commit 666369c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
pip install ".[dev]"
- name: Test with pytest
run: |
pytest --color=yes --cov={{cookiecutter.project_slug}} --cov-report=xml --cov-report=term-missing tests
pytest --color=yes --cov=cellmap_models --cov-report=xml --cov-report=term-missing tests
# Coverage should work out of the box for public repos. For private repos, more setup is likely required.
- name: Coverage
uses: codecov/codecov-action@v4
6 changes: 4 additions & 2 deletions src/cellmap_models/pytorch/cosem/load_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ def load_model(checkpoint_name: str) -> torch.nn.Module:
):
if checkpoint_name in model_names:
checkpoint_path = Path(
Path(__file__).parent / Path(checkpoint_name) / "model.py"
Path(__file__).parent
/ Path(checkpoint_name.replace(".", "_"))
/ "model.py"
)
no_weights = True
else:
raise ValueError(f"Model {checkpoint_name} not found")
else:
checkpoint_path = Path(
Path(__file__).parent / Path(checkpoint_name)
Path(__file__).parent / Path(checkpoint_name.replace(".", "_"))
).with_suffix(".pth")
if not checkpoint_path.exists():
url = models_dict[checkpoint_name]
Expand Down
Binary file not shown.

0 comments on commit 666369c

Please sign in to comment.