diff --git a/CHANGELOG.md b/CHANGELOG.md index 67654176f6..dfbd8a1015 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,11 @@ # v0.2.2 This version adds support for PyTorch 1.4.0. There are also several minor feature improvements and bug fixes listed below. - -- added option for neutral elements to be used in the place of empty tensors in reduction operations (`operations.__reduce_op`) (cf. [#369](https://github.com/helmholtz-analytics/heat/issues/369) and [#444](https://github.com/helmholtz-analytics/heat/issues/444)) -- `var` and `std` both now support iterable axis arguments -- updated pull request template -- bug fix: `x.unique()` returns a DNDarray both in distributed and non-distributed mode (cf. [#464]) +- [#443](https://github.com/helmholtz-analytics/heat/pull/443) added option for neutral elements to be used in the place of empty tensors in reduction operations (`operations.__reduce_op`) (cf. [#369](https://github.com/helmholtz-analytics/heat/issues/369) and [#444](https://github.com/helmholtz-analytics/heat/issues/444)) +- [#445](https://github.com/helmholtz-analytics/heat/pull/445) `var` and `std` both now support iterable axis arguments +- [#452](https://github.com/helmholtz-analytics/heat/pull/452) updated pull request template +- [#465](https://github.com/helmholtz-analytics/heat/pull/465) bug fix: `x.unique()` returns a DNDarray both in distributed and non-distributed mode (cf. [#464]) +- [#463](https://github.com/helmholtz-analytics/heat/pull/463) Bugfix: Lasso tests now run with both GPUs and CPUs # v0.2.1 diff --git a/heat/core/regression/lasso/tests/test_lasso.py b/heat/core/regression/lasso/tests/test_lasso.py index 64cb5a4ab7..69c3bc3950 100644 --- a/heat/core/regression/lasso/tests/test_lasso.py +++ b/heat/core/regression/lasso/tests/test_lasso.py @@ -24,10 +24,14 @@ def test_lasso(self): # ToDo: add additional tests # get some test data X = ht.load_hdf5( - os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), dataset="x" + os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), + dataset="x", + device=ht_device, ) y = ht.load_hdf5( - os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), dataset="y" + os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), + dataset="y", + device=ht_device, ) # normalize dataset @@ -60,15 +64,19 @@ def test_lasso(self): self.assertEqual(yest.shape, (m,)) X = ht.load_hdf5( - os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), dataset="x" + os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), + dataset="x", + device=ht_device, ) y = ht.load_hdf5( - os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), dataset="y" + os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), + dataset="y", + device=ht_device, ) # Now the same stuff again in PyTorch - X = torch.tensor(X._DNDarray__array) - y = torch.tensor(y._DNDarray__array) + X = torch.tensor(X._DNDarray__array, device=device) + y = torch.tensor(y._DNDarray__array, device=device) # normalize dataset X = X / torch.sqrt((torch.mean(X ** 2, 0))) @@ -100,15 +108,19 @@ def test_lasso(self): self.assertEqual(yest.shape, (m,)) X = ht.load_hdf5( - os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), dataset="x" + os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), + dataset="x", + device=ht_device, ) y = ht.load_hdf5( - os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), dataset="y" + os.path.join(os.getcwd(), "heat/datasets/data/diabetes.h5"), + dataset="y", + device=ht_device, ) # Now the same stuff again in PyTorch - X = X._DNDarray__array.numpy() - y = y._DNDarray__array.numpy() + X = X._DNDarray__array.cpu().numpy() + y = y._DNDarray__array.cpu().numpy() # normalize dataset X = X / np.sqrt((np.mean(X ** 2, axis=0, keepdims=True)))