Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 18, 2024
1 parent 233470d commit 83c721b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pydra/utils/hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ def bytes_repr_numpy(obj: numpy.ndarray, cache: Cache) -> Iterator[bytes]:
else:
yield obj.tobytes(order="C")


if HAVE_PYTORCH:

@register_serializer(torch.Tensor)

Check warning on line 591 in pydra/utils/hash.py

View check run for this annotation

Codecov / codecov/patch

pydra/utils/hash.py#L591

Added line #L591 was not covered by tests
Expand All @@ -608,4 +609,5 @@ def bytes_repr_pandas(obj: pandas.DataFrame, cache: Cache) -> Iterator[bytes]:
yield f"{obj.__class__.__module__}{obj.__class__.__name__}:".encode()
yield from bytes_repr_numpy(obj.to_numpy(), cache)

Check warning on line 610 in pydra/utils/hash.py

View check run for this annotation

Codecov / codecov/patch

pydra/utils/hash.py#L609-L610

Added lines #L609 - L610 were not covered by tests


NUMPY_CHUNK_LEN = 8192

0 comments on commit 83c721b

Please sign in to comment.