Skip to content

Commit

Permalink
pre-comit update
Browse files Browse the repository at this point in the history
  • Loading branch information
RRobert92 committed May 8, 2024
1 parent 8ef4eed commit 4c43202
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions tardis_em/utils/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,27 +306,6 @@ def init_check(self):
else:
assert not assert_, msg

# Check if there is anything to predict in user indicated folder
msg = f"Given {self.dir} does not contain any recognizable file!"
assert_ = len(self.predict_list) == 0
if self.tardis_logo:
if assert_:
TardisError(
id_="12",
py="tardis_em/utils/predictor.py",
desc=msg,
)
sys.exit()
else:
self.tardis_progress(
title=self.title,
text_1=f"Found {len(self.predict_list)} images to predict!",
text_2=f"Device: {self.device}",
text_7="Current Task: Setting-up environment...",
)
else:
assert not assert_, msg

def build_NN(self, NN: str):
if NN == "Microtubule":
self.normalize_px = 25
Expand Down Expand Up @@ -677,6 +656,27 @@ def get_file_list(self, output=True):
self.output = None
self.am_output = None

# Check if there is anything to predict in user indicated folder
msg = f"Given {self.dir} does not contain any recognizable file!"
assert_ = len(self.predict_list) == 0
if self.tardis_logo:
if assert_:
TardisError(
id_="12",
py="tardis_em/utils/predictor.py",
desc=msg,
)
sys.exit()
else:
self.tardis_progress(
title=self.title,
text_1=f"Found {len(self.predict_list)} images to predict!",
text_2=f"Device: {self.device}",
text_7="Current Task: Setting-up environment...",
)
else:
assert not assert_, msg

def log_tardis(self, id_: int, i: Union[str, np.ndarray], log_id: float):
if isinstance(i, np.ndarray):
i = "Numpy array"
Expand Down

0 comments on commit 4c43202

Please sign in to comment.