Skip to content

Commit

Permalink
Update numpy requirement from <1.27.0,>=1.21.5 to >=1.21.5,<2.1.0 (mo…
Browse files Browse the repository at this point in the history
…saicml#3406)

* Update numpy requirement from <1.27.0,>=1.21.5 to >=1.21.5,<2.1.0

Updates the requirements on [numpy](https://github.com/numpy/numpy) to permit the latest version.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst)
- [Commits](numpy/numpy@v1.21.5...v2.0.0)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* commit

* fix typing

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mihir Patel <[email protected]>
Co-authored-by: Saaketh Narayan <[email protected]>
  • Loading branch information
3 people committed Jul 21, 2024
1 parent 9a41971 commit 82c348e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions composer/algorithms/augmix/augmix.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def _augmix_pil_image(
aug = np.random.choice(augmentation_set)
augmented_image = aug(augmented_image, severity)
augmented_combination += chain_weights[chain_i] * np.asarray(augmented_image)
mixed = (1 - mixing_weight) * np.asarray(img_pil) + mixing_weight * augmented_combination
mixed = Image.fromarray(np.uint8(mixed))
mixed = (1 - mixing_weight) * np.asarray(img_pil, dtype=np.float32) + mixing_weight * augmented_combination
mixed = Image.fromarray(np.uint8(mixed)) # type: ignore
return mixed

f_pil = functools.partial(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def package_files(prefix: str, directory: str, extension: str):
'torchvision>=0.13.1,<0.18.2',
'torch>=2.1.2,<2.3.2',
'requests>=2.26.0,<3',
'numpy>=1.21.5,<1.27.0',
'numpy>=1.21.5,<2.1.0',
'psutil>=5.8.0,<6',
'coolname>=1.1.0,<3',
'tabulate==0.9.0', # for auto-generating tables
Expand Down

0 comments on commit 82c348e

Please sign in to comment.