Skip to content

Commit

Permalink
Merge release v1.3.1 into main (#1278)
Browse files Browse the repository at this point in the history
* copy from fix/1168-update-docker-image-and-documentation-on-release13x-and-main

* corrected bug

* docker scripts documentation

* Fix tzdata handling and merging multiple actions

The copy of tzdata was originally intended to be used from the root
of the repository. The documentation states building docker images
from the docker directory. This had to be aligned.

Moreover, each RUN line in a Dockerfile represents the building of
another intermediate image. This has to be taken into account when
writing the files. Commands such as "cd" will not work on separate
lines.

* update pre-commit-config

* 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 <[email protected]>

* Fix `ht.diff` for 1-element-axis edge case (#1201)

* fix diff axis size one

* fix diff() axis along split

* remove debug code

---------

Co-authored-by: Claudia Comito <[email protected]>

* update version to 1.3.1 before release

* revert

* Update version before release  (#1274)

* update version to 1.3.1 before release

* revert

* update version before release

* update version to dev, update changelog

---------

Co-authored-by: Gutiérrez Hermosillo Muriedas, Juan Pedro <[email protected]>
Co-authored-by: Hoppe <[email protected]>
Co-authored-by: Bjoern Hagemeier <[email protected]>
Co-authored-by: Michael Tarnawa <[email protected]>
Co-authored-by: Fabian Hoppe <[email protected]>
  • Loading branch information
6 people authored Nov 23, 2023
1 parent 5125ccc commit 3302a44
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# v1.3.1 - Bug fixes, Docker documentation update

## Bug fixes
- #1259 Bug-fix for `ht.regression.Lasso()` on GPU (by @mrfh92)
- #1201 Fix `ht.diff` for 1-element-axis edge case (by @mtar)

## Changes

### Interoperability

- #1257 Docker release 1.3.x update (by @JuanPedroGHM)

### Maintenance

- #1274 Update version before release (by @ClaudiaComito)
- #1267 Unit tests: Increase tolerance for `ht.allclose` on `ht.inv` operations for all torch versions (by @ClaudiaComito)
- #1266 Sync `pre-commit` configuration with `main` branch (by @ClaudiaComito)
- #1264 Fix Pytorch release tracking workflows (by @mtar)
- #1234 Update sphinx package requirements (by @mtar)
- #1187 Create configuration file for Read the Docs (by @mtar)

# v1.3.0 - Scalable SVD, GSoC`22 contributions, Docker image, PyTorch 2 support, AMD GPUs acceleration

This release includes many important updates (see below). We particularly would like to thank our enthusiastic [GSoC2022](https://summerofcode.withgoogle.com/programs/2022) / tentative GSoC2023 contributors @Mystic-Slice @neosunhan @Sai-Suraj-27 @shahpratham @AsRaNi1 @Ishaan-Chandak 🙏🏼 Thank you so much!
Expand Down
6 changes: 4 additions & 2 deletions heat/core/arithmetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,8 @@ def diff(

# build the slice for the first element on the specified axis
arb_slice = [slice(None)] * len(a.shape)
arb_slice[axis] = 0
if ret.lshape[axis] > 0:
arb_slice[axis] = 0
# send the first element of the array to rank - 1
if rank > 0:
snd = ret.comm.Isend(ret.lloc[arb_slice].clone(), dest=rank - 1, tag=rank)
Expand All @@ -554,7 +555,8 @@ def diff(
if rank < size - 1:
cr_slice = [slice(None)] * len(a.shape)
# slice of 1 element in the selected axis for the shape creation
cr_slice[axis] = 1
if ret.lshape[axis] > 1:
cr_slice[axis] = 1
recv_data = torch.ones(
ret.lloc[cr_slice].shape, dtype=ret.dtype.torch_type(), device=a.device.torch_device
)
Expand Down
9 changes: 9 additions & 0 deletions heat/core/tests/test_arithmetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,15 @@ def test_diff(self):
ht_diff = ht.diff(ht_array, n=0)
self.assertTrue(ht.equal(ht_diff, ht_array))

# edge cases
ht_arr = ht.ones((2, 1, 2), split=0)
ht_diff = ht.diff(ht_arr, axis=1)
self.assertEqual(ht_diff.gshape, (2, 0, 2))

ht_arr = ht.ones((2, 1, 2), split=1)
ht_diff = ht.diff(ht_arr, axis=1)
self.assertEqual(ht_diff.gshape, (2, 0, 2))

# raises
with self.assertRaises(ValueError):
ht.diff(ht_array, n=-2)
Expand Down

0 comments on commit 3302a44

Please sign in to comment.