Skip to content

Commit

Permalink
refactored file structure. updated TPTBox requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrik-code committed Sep 9, 2024
1 parent 43f9baf commit 815e3ae
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ torchmetrics = "^1.1.2"
tqdm = "^4.66.1"
einops= "^0.6.1"
nnunetv2 = "2.4.2"
tptbox = "^0.1.4"
tptbox = "^0.1.6"
antspyx = "0.4.2"
rich = "^13.6.0"

Expand Down
4 changes: 2 additions & 2 deletions spineps/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

from TPTBox import Log_Type, No_Logger

from spineps.auto_download import download_if_missing, instances, semantic
from spineps.seg_enums import Modality
from spineps.seg_model import Segmentation_Model, modeltype2class
from spineps.seg_modelconfig import load_inference_config
from spineps.utils.auto_download import download_if_missing, instances, semantic
from spineps.utils.filepaths import get_mri_segmentor_models_dir, search_path
from spineps.utils.seg_modelconfig import load_inference_config

logger = No_Logger()
logger.prefix = "Models"
Expand Down
2 changes: 1 addition & 1 deletion spineps/seg_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
from typing_extensions import Self

from spineps.seg_enums import Acquisition, InputType, Modality, ModelType, OutputType
from spineps.seg_modelconfig import Segmentation_Inference_Config, load_inference_config
from spineps.Unet3D.pl_unet import PLNet
from spineps.utils.citation_reminder import citation_reminder
from spineps.utils.filepaths import search_path
from spineps.utils.inference_api import load_inf_model, run_inference
from spineps.utils.seg_modelconfig import Segmentation_Inference_Config, load_inference_config

threads_started = False

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion unit_tests/test_filepaths.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_search_path_multi(self):
print(package_path)
predictor_search = search_path(package_path, query="seg_*.py")
print(predictor_search)
self.assertTrue(len(predictor_search) == 6)
self.assertTrue(len(predictor_search) == 5, predictor_search)
# self.assertEqual(predictor_search[0], package_path.joinpath("utils", "predictor.py"))

def test_env_path(self):
Expand Down

0 comments on commit 815e3ae

Please sign in to comment.