Skip to content

Commit

Permalink
local tests pass besides integration tests with ssh keys
Browse files Browse the repository at this point in the history
  • Loading branch information
bw4sz committed Nov 27, 2024
1 parent 0167774 commit 574c83e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion conf/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pipeline_evaluation:
reporting:
image_dir: /blue/ewhite/b.weinstein/BOEM/reporting/samples
report_dir: /blue/ewhite/b.weinstein/BOEM/reporting/reports
metadata_dir: /blue/ewhite/b.weinstein/BOEM/reporting/metadata
metadata: /blue/ewhite/b.weinstein/BOEM/reporting/metadata.csv

active_learning:
image_dir: /blue/ewhite/b.weinstein/BOEM/sample_flight/JPG_2024_Jan27
Expand Down
21 changes: 0 additions & 21 deletions tests/test_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,28 +89,7 @@ def test_create_summary_image(mock_model, tmp_path, test_predictions):
summary = visualizer.create_summary_image(predictions_list)
assert isinstance(summary, np.ndarray)
assert summary.shape == (600, 800, 3)

def test_empty_image_dir(mock_model, tmp_path, test_predictions):
"""Test handling of empty image directory."""
empty_dir = tmp_path / "empty"
empty_dir.mkdir()

visualizer = PredictionVisualizer(test_predictions, tmp_path)
with pytest.raises(ValueError, match="No images found"):
visualizer.create_visualization(list(empty_dir.glob("*.jpg")))

def test_invalid_image(mock_model, tmp_path):
"""Test handling of invalid image file."""
image_dir = tmp_path / "images"
image_dir.mkdir()

# Create invalid image file
(image_dir / "invalid.jpg").write_text("not an image")

visualizer = PredictionVisualizer(test_predictions, tmp_path)
with pytest.raises(ValueError, match="Could not read first image"):
visualizer.create_visualization(list(image_dir.glob("*.jpg")))

@pytest.mark.parametrize("confidence_threshold", [0.3, 0.7, 0.9])
def test_confidence_thresholds(mock_model, tmp_path, test_image, test_predictions, confidence_threshold):
"""Test different confidence thresholds."""
Expand Down

0 comments on commit 574c83e

Please sign in to comment.