diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index c4830673..efdc215a 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -13,7 +13,7 @@ jobs: os: - ubuntu-latest - windows-latest - - macos-13 + - macos-latest py: - "3.11" - "3.10" diff --git a/basic_pitch/inference.py b/basic_pitch/inference.py index 85e2f4e4..481a86e2 100644 --- a/basic_pitch/inference.py +++ b/basic_pitch/inference.py @@ -153,7 +153,10 @@ def predict(self, x: npt.NDArray[np.float32]) -> Dict[str, npt.NDArray[np.float3 if self.model_type == Model.MODEL_TYPES.TENSORFLOW: return {k: v.numpy() for k, v in cast(tf.keras.Model, self.model(x)).items()} elif self.model_type == Model.MODEL_TYPES.COREML: - return cast(ct.models.MLModel, self.model.predict({"input": x})) # type: ignore + print(f"isfinite: {np.all(np.isfinite(x))}", flush=True) + print(f"shape: {x.shape}", flush=True) + print(f"dtype: {x.dtype}") + return cast(ct.models.MLModel, self.model).predict({"input": x}) # type: ignore elif self.model_type == Model.MODEL_TYPES.TFLITE: return self.model(input_2=x) # type: ignore elif self.model_type == Model.MODEL_TYPES.ONNX: diff --git a/tox.ini b/tox.ini index ed61e4ba..73b0c5de 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ usedevelop = True [testenv] deps = -e .[test] commands = - pytest tests --ignore tests/test_nn.py {posargs} + pytest tests --ignore tests/test_nn.py -s {posargs} setenv = SOURCE = {toxinidir}/basic_pitch TEST_SOURCE = {toxinidir}/tests