diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5aeb12c..490a868 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,12 +12,11 @@ jobs: fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11"] - DISABLE_JIT: [0, 1] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -29,12 +28,9 @@ jobs: - name: Test with unittest run: | coverage run -m unittest discover ./tests 'test_*.py' - env: - NUMBA_DISABLE_JIT: ${{ matrix.DISABLE_JIT }} # - name: Coverage with Code Climate # uses: paambaati/codeclimate-action@v4.0.0 # # send report only when jit is disabled, and for python 3.11 - # if: ${{ matrix.DISABLE_JIT == 1 }} # env: # CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_REPORTER_ID }} # with: diff --git a/benchmarking/requirements-benchmarking.txt b/benchmarking/requirements-benchmarking.txt new file mode 100644 index 0000000..31bd947 --- /dev/null +++ b/benchmarking/requirements-benchmarking.txt @@ -0,0 +1,10 @@ +torch==2.1.2 +botorch==0.9.5 +matplotlib>=3.7.1 +numpy>=1.24.4 +pandas>=2.1.0 +scipy>=1.11.0 +joblib==1.3.2 +globopt==1.0.0 +gpytorch==1.11 +prettytable>=3.8.0 diff --git a/tests/test_regression.py b/tests/test_regression.py index c332ae3..0eca2c9 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -15,13 +15,13 @@ def test_fit_and_partial_fit(self) -> None: X = torch.as_tensor([-2.61, -1.92, -0.63, 0.38, 2], device="cpu").unsqueeze(-1) Y = problem(X) n = 3 - mdls = [Idw(X[:n], Y[:n]), Rbf(X[:n], Y[:n], eps=0.5, eig_tol=0.0)] + mdls = [Idw(X[:n], Y[:n]), Rbf(X[:n], Y[:n], eps=0.5, svd_tol=0.0)] for i in range(len(mdls)): mdl = mdls[i] if isinstance(mdl, Idw): mdls[i] = Idw(X, Y) else: - mdls[i] = Rbf(X, Y, mdl.eps, mdl.eig_tol, mdl.state) + mdls[i] = Rbf(X, Y, mdl.eps, mdl.svd_tol, mdl.state) x_hat = torch.linspace(-3, 3, 100, dtype=X.dtype).view(1, -1, 1) y_hat = torch.stack([mdl.posterior(x_hat).mean.squeeze() for mdl in mdls]) y_hat_expected = torch.as_tensor(RESULTS["y_hat"][:2], dtype=y_hat.dtype)