Skip to content

Commit

Permalink
Merge pull request #202 from nel-lab/allow-remove-failed-items
Browse files Browse the repository at this point in the history
allow removing failed or not run items
  • Loading branch information
kushalkolar committed May 17, 2023
2 parents 59fa5ae + cebcea1 commit 9970894
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion mesmerize_core/caiman_extensions/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,18 @@ def remove_item(self, index: Union[int, str, UUID], remove_data: bool = True, sa
-------
"""
if self._df.iloc[index]["outputs"] is not None:
if self._df.iloc[index]["outputs"]["success"] is True:
# if success, don't skip checks
skip_checks = False
else:
# if failed item, skip checks, allow removal since it cannot have children
skip_checks = True
else:
# if not run, skip checks, it cannot have children
skip_checks = True

if self._df.iloc[index]["algo"] == "mcorr":
if self._df.iloc[index]["algo"] == "mcorr" and not skip_checks:
if safe_removal:
children = self.get_children(index)
if len(children) > 0:
Expand Down

0 comments on commit 9970894

Please sign in to comment.