Skip to content

Commit

Permalink
s/add/union
Browse files Browse the repository at this point in the history
  • Loading branch information
mittagessen committed Oct 18, 2024
1 parent 3dce863 commit 99e8e58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_newpolygons.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def test_ketoscli_train_old_model(self):
fp = str(Path(tempdir) / "test.xml")

self._test_ketoscli(
args=['train', '-f', 'xml', '-N', '1', '-q', 'fixed', '-i', self.old_model_path, '--resize', 'add', '-o', mfp, '--workers', '0', self.segmented_img],
args=['train', '-f', 'xml', '-N', '1', '-q', 'fixed', '-i', self.old_model_path, '--resize', 'union', '-o', mfp, '--workers', '0', self.segmented_img],
expect_legacy=False,
check_exit_code=[0, 1], # Model may not improve during training
)
Expand All @@ -268,7 +268,7 @@ def test_ketoscli_train_old_model_force_legacy(self):
fp = str(Path(tempdir) / "test.xml")

self._test_ketoscli(
args=['train', '--legacy-polygons', '-f', 'xml', '-N', '1', '-q', 'fixed', '-i', self.old_model_path, '--resize', 'add', '-o', mfp, '--workers', '0', self.segmented_img],
args=['train', '--legacy-polygons', '-f', 'xml', '-N', '1', '-q', 'fixed', '-i', self.old_model_path, '--resize', 'union', '-o', mfp, '--workers', '0', self.segmented_img],
expect_legacy=True,
check_exit_code=[0, 1], # Model may not improve during training
)
Expand Down Expand Up @@ -326,7 +326,7 @@ def test_ketoscli_pretrain_old_model(self):
fp = str(Path(tempdir) / "test.xml")

self._test_ketoscli(
args=['pretrain', '-f', 'xml', '-N', '1', '-q', 'fixed', '-i', self.old_model_path, '--resize', 'add', '-o', mfp, '--workers', '0', self.segmented_img],
args=['pretrain', '-f', 'xml', '-N', '1', '-q', 'fixed', '-i', self.old_model_path, '--resize', 'union', '-o', mfp, '--workers', '0', self.segmented_img],
expect_legacy=False,
check_exit_code=[0, 1], # Model may not improve during training
)
Expand All @@ -349,7 +349,7 @@ def _assertWarnsWhenTrainingArrow(self,
if force_legacy:
args = ['--legacy-polygons'] + args
if from_model:
args = ['-i', from_model, '--resize', 'add'] + args
args = ['-i', from_model, '--resize', 'union'] + args

print("ketos", 'train', *args)
run = self.runner.invoke(ketos_cli, ['train'] + args)
Expand Down

0 comments on commit 99e8e58

Please sign in to comment.