Skip to content

Commit

Permalink
less strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ziw-liu committed Dec 7, 2024
1 parent f86e3d5 commit 30b2660
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/translation/test_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ def test_segmentation_metrics_2d(pred_channel, labels_hcs_dataset, tmp_path) ->
trainer = Trainer(logger=CSVLogger(tmp_path, name="", version=""))
trainer.test(lm, datamodule=dm)
metrics = pd.read_csv(tmp_path / "metrics.csv")
accuracy = metrics["accuracy"].to_numpy()
if pred_channel == "DAPI":
assert_array_equal(
metrics["accuracy"].to_numpy(), np.ones_like(metrics["accuracy"])
)
assert_array_equal(accuracy, np.ones_like(accuracy))
else:
assert 0 < metrics["accuracy"].mean() < 1
assert 0 < accuracy.mean() < 1

0 comments on commit 30b2660

Please sign in to comment.