Skip to content

Commit

Permalink
Remove extra put tensor call in python client (#464)
Browse files Browse the repository at this point in the history
Fixes a bug which accidentally was doing two put_tensor calls
in the Python client.

[ committed by @ashao ]
[ reviewed by @MattToast ]
  • Loading branch information
ashao authored Feb 16, 2024
1 parent 559b834 commit 6c03d27
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 18 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
Changelog
=========

0.5.2
-----

Released on February 16, 2024

Description

- Fixed bug which was sending tensors to the database twice (Python Client)

Detailed Notes

- A previous bug fix for the Python client which addressed a problem when sending
numpy views inadvertently kept the original put_tensor call in place. This
essentially doubles the cost of the operation. (PR464_)

.. _PR464: https://github.com/CrayLabs/SmartRedis/pull/464


0.5.1
-----

Expand Down
1 change: 0 additions & 1 deletion src/python/module/smartredis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ def put_tensor(self, name: str, data: np.ndarray) -> None:
typecheck(name, "name", str)
typecheck(data, "data", np.ndarray)
dtype = Dtypes.tensor_from_numpy(data)
self._client.put_tensor(name, dtype, data)
if data.base is None:
self._client.put_tensor(name, dtype, data)
else:
Expand Down

0 comments on commit 6c03d27

Please sign in to comment.