diff --git a/Makefile b/Makefile index 9478c0632..bf0e922b6 100644 --- a/Makefile +++ b/Makefile @@ -12,13 +12,12 @@ pre-commit: pre-commit install pre-commit run --all -tests: - @echo "Running unit tests..." - pytest ./lite/tests/text_generation -v - -integration-tests: - @echo "Running external integration tests..." - pytest ./lite/tests/text_generation -v +test: + @echo "Running tests..." + pytest tests/classification + pytest tests/object_detection + pytest tests/semantic_segmentation + pytest tests/text_generation clean: @echo "Cleaning up temporary files..." diff --git a/docs/contributing.md b/docs/contributing.md index c2f312e1e..f4ae4b96a 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -61,12 +61,7 @@ For linting and code formatting use: make pre-commit ``` -For unit and functional testing: +Run all tests using: ```shell make tests -``` - -For integration testing: -```shell -make external-tests ``` \ No newline at end of file diff --git a/src/valor_lite/classification/computation.py b/src/valor_lite/classification/computation.py index 14c84e233..5fe702599 100644 --- a/src/valor_lite/classification/computation.py +++ b/src/valor_lite/classification/computation.py @@ -291,7 +291,7 @@ def compute_confusion_matrix( confusion_matrix = np.full( (n_scores, n_labels, n_labels, 2 * n_examples + 1), fill_value=-1.0, - dtype=np.float64, + dtype=np.float32, ) unmatched_ground_truths = np.full( (n_scores, n_labels, n_examples + 1), @@ -389,4 +389,4 @@ def compute_confusion_matrix( 1 : misprd_label_examples.shape[0] + 1, ] = misprd_label_examples[:, 0].flatten() - return confusion_matrix, unmatched_ground_truths + return confusion_matrix, unmatched_ground_truths # type: ignore[reportReturnType] diff --git a/src/valor_lite/object_detection/computation.py b/src/valor_lite/object_detection/computation.py index 6d9d48ce1..4536b7367 100644 --- a/src/valor_lite/object_detection/computation.py +++ b/src/valor_lite/object_detection/computation.py @@ -685,12 +685,12 @@ def compute_confusion_matrix( confusion_matrix = -1 * np.ones( # (datum idx, gt idx, pd idx, pd score) * n_examples + count (n_ious, n_scores, n_labels, n_labels, 4 * n_examples + 1), - dtype=np.float64, + dtype=np.float32, ) unmatched_predictions = -1 * np.ones( # (datum idx, pd idx, pd score) * n_examples + count (n_ious, n_scores, n_labels, 3 * n_examples + 1), - dtype=np.float64, + dtype=np.float32, ) unmatched_ground_truths = -1 * np.ones( # (datum idx, gt idx) * n_examples + count