From 5b37e05adf9c7c70c95c2167b131810da1e0331b Mon Sep 17 00:00:00 2001 From: Hoppe Date: Tue, 7 Nov 2023 16:21:19 +0100 Subject: [PATCH 1/2] corrected bug --- heat/regression/lasso.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heat/regression/lasso.py b/heat/regression/lasso.py index b858674e4a..7d99a72454 100644 --- a/heat/regression/lasso.py +++ b/heat/regression/lasso.py @@ -149,7 +149,7 @@ def fit(self, x: DNDarray, y: DNDarray) -> None: # Looping through each coordinate for j in range(n): - X_j = ht.array(x.larray[:, j : j + 1], is_split=0) + X_j = ht.array(x.larray[:, j : j + 1], is_split=0, device=x.device, comm=x.comm) y_est = x @ theta theta_j = theta.larray[j].item() From ee39c63c30aca9a9162e2a4fb54b4f7e697de263 Mon Sep 17 00:00:00 2001 From: Michael Tarnawa Date: Wed, 22 Nov 2023 06:27:50 +0100 Subject: [PATCH 2/2] Fix Pytorch release tracking workflows (#1264) * upgrade checkout action & use default token * increase tolerance for single-prec torch.inv comparison * fix typo --------- Co-authored-by: Claudia Comito <39374113+ClaudiaComito@users.noreply.github.com> --- .github/workflows/pytorch-latest-main.yml | 3 +-- .github/workflows/pytorch-latest-release.yml | 3 +-- heat/core/linalg/tests/test_solver.py | 11 ++--------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pytorch-latest-main.yml b/.github/workflows/pytorch-latest-main.yml index 139c66d82c..c59736c82f 100644 --- a/.github/workflows/pytorch-latest-main.yml +++ b/.github/workflows/pytorch-latest-main.yml @@ -11,9 +11,8 @@ jobs: runs-on: ubuntu-latest if: ${{ github.repository }} == 'hemlholtz-analytics/heat' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: - token: ${{ secrets.GHACTIONS }} ref: '${{ env.base_branch }}' - name: Fetch PyTorch release version run: | diff --git a/.github/workflows/pytorch-latest-release.yml b/.github/workflows/pytorch-latest-release.yml index 0daa39fc2c..6126fa610a 100644 --- a/.github/workflows/pytorch-latest-release.yml +++ b/.github/workflows/pytorch-latest-release.yml @@ -11,9 +11,8 @@ jobs: runs-on: ubuntu-latest if: ${{ github.repository }} == 'hemlholtz-analytics/heat' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: - token: ${{ secrets.GHACTIONS }} ref: '${{ env.base_branch }}' - name: Fetch PyTorch release version run: | diff --git a/heat/core/linalg/tests/test_solver.py b/heat/core/linalg/tests/test_solver.py index 5bf2cbff08..f8f9889a9d 100644 --- a/heat/core/linalg/tests/test_solver.py +++ b/heat/core/linalg/tests/test_solver.py @@ -65,15 +65,8 @@ def test_lanczos(self): lanczos_B = V_out @ T_out @ V_inv self.assertTrue(ht.allclose(lanczos_B, B)) - # single precision tolerance - if ( - int(torch.__version__.split(".")[0]) == 1 - and int(torch.__version__.split(".")[1]) >= 13 - or int(torch.__version__.split(".")[0]) > 1 - ): - tolerance = 1e-3 - else: - tolerance = 1e-4 + # single precision tolerance for torch.inv() is pretty bad + tolerance = 1e-3 # float32, pre_defined v0, split mismatch A = ht.random.randn(n, n, dtype=ht.float32, split=0)