Skip to content

Commit

Permalink
adapt to new epsilon scheduler class
Browse files Browse the repository at this point in the history
  • Loading branch information
selmanozleyen committed Dec 10, 2024
1 parent 14e96e6 commit b014233
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 16 deletions.
3 changes: 1 addition & 2 deletions tests/problems/cross_modality/test_translation_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ def test_pass_arguments(self, adata_translation_split: Tuple[AnnData, AnnData],
el = getattr(geom, val)[0] if isinstance(getattr(geom, val), tuple) else getattr(geom, val)
if arg == "epsilon":
eps_processed = getattr(geom, val)
assert isinstance(eps_processed, epsilon_scheduler.Epsilon)
assert eps_processed.target == args_to_check[arg], arg
assert eps_processed == args_to_check[arg], arg
else:
assert getattr(geom, val) == args_to_check[arg], arg
assert el == args_to_check[arg]
Expand Down
3 changes: 1 addition & 2 deletions tests/problems/generic/test_fgw_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ def test_pass_arguments(self, adata_space_rotate: AnnData, args_to_check: Mappin
el = getattr(geom, val)[0] if isinstance(getattr(geom, val), tuple) else getattr(geom, val)
if arg == "epsilon":
eps_processed = getattr(geom, val)
assert isinstance(eps_processed, epsilon_scheduler.Epsilon)
assert eps_processed.target == args_to_check[arg], arg
assert eps_processed == args_to_check[arg], arg
else:
assert getattr(geom, val) == args_to_check[arg], arg
assert el == args_to_check[arg]
Expand Down
3 changes: 1 addition & 2 deletions tests/problems/generic/test_gw_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ def test_pass_arguments(self, adata_space_rotate: AnnData, args_to_check: Mappin
el = getattr(geom, val)[0] if isinstance(getattr(geom, val), tuple) else getattr(geom, val)
if arg == "epsilon":
eps_processed = getattr(geom, val)
assert isinstance(eps_processed, epsilon_scheduler.Epsilon)
assert eps_processed.target == args_to_check[arg], arg
assert eps_processed == args_to_check[arg], arg
else:
assert getattr(geom, val) == args_to_check[arg], arg
assert el == args_to_check[arg]
Expand Down
3 changes: 1 addition & 2 deletions tests/problems/generic/test_sinkhorn_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ def test_pass_arguments(self, adata_time: AnnData, args_to_check: Mapping[str, A
el = getattr(geom, val)[0] if isinstance(getattr(geom, val), tuple) else getattr(geom, val)
if arg == "epsilon":
eps_processed = getattr(geom, val)
assert isinstance(eps_processed, epsilon_scheduler.Epsilon)
assert eps_processed.target == args_to_check[arg], arg
assert eps_processed == args_to_check[arg], arg
else:
assert getattr(geom, val) == args_to_check[arg], arg
assert el == args_to_check[arg]
Expand Down
3 changes: 1 addition & 2 deletions tests/problems/space/test_alignment_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ def test_pass_arguments(self, adata_space_rotate: AnnData, args_to_check: Mappin
el = getattr(geom, val)[0] if isinstance(getattr(geom, val), tuple) else getattr(geom, val)
if arg == "epsilon":
eps_processed = getattr(geom, val)
assert isinstance(eps_processed, epsilon_scheduler.Epsilon)
assert eps_processed.target == args_to_check[arg], arg
assert eps_processed == args_to_check[arg], arg
else:
assert getattr(geom, val) == args_to_check[arg], arg
assert el == args_to_check[arg]
Expand Down
3 changes: 1 addition & 2 deletions tests/problems/space/test_mapping_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ def test_pass_arguments(self, adata_mapping: AnnData, args_to_check: Mapping[str
el = getattr(geom, val)[0] if isinstance(getattr(geom, val), tuple) else getattr(geom, val)
if arg == "epsilon":
eps_processed = getattr(geom, val)
assert isinstance(eps_processed, epsilon_scheduler.Epsilon)
assert eps_processed.target == args_to_check[arg], arg
assert eps_processed == args_to_check[arg], arg
else:
assert getattr(geom, val) == args_to_check[arg], arg
assert el == args_to_check[arg]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ def test_pass_arguments(self, adata_spatio_temporal: AnnData, args_to_check: Map
el = getattr(geom, val)[0] if isinstance(getattr(geom, val), tuple) else getattr(geom, val)
if arg == "epsilon":
eps_processed = getattr(geom, val)
assert isinstance(eps_processed, epsilon_scheduler.Epsilon)
assert eps_processed.target == args_to_check[arg], arg
assert eps_processed == args_to_check[arg], arg
else:
assert getattr(geom, val) == args_to_check[arg], arg
assert el == args_to_check[arg]
Expand Down
3 changes: 1 addition & 2 deletions tests/problems/time/test_temporal_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,7 @@ def test_pass_arguments(self, adata_time: AnnData, args_to_check: Mapping[str, A
el = getattr(geom, val)[0] if isinstance(getattr(geom, val), tuple) else getattr(geom, val)
if arg == "epsilon":
eps_processed = getattr(geom, val)
assert isinstance(eps_processed, epsilon_scheduler.Epsilon)
assert eps_processed.target == args_to_check[arg], arg
assert eps_processed == args_to_check[arg], arg
else:
assert getattr(geom, val) == args_to_check[arg], arg
assert el == args_to_check[arg]
Expand Down

0 comments on commit b014233

Please sign in to comment.