-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump numpy from 1.19.5 to 1.21.6 #11078
Conversation
5284aca
to
c4f5724
Compare
@dependabot rebase |
Looks like this PR is already up-to-date with main! If you'd still like to recreate it from scratch, overwriting any edits, you can request |
5a1a9fa
to
bc2a1df
Compare
@dependabot rebase |
bc2a1df
to
88899b4
Compare
ce96de2
to
1244111
Compare
452ce4c
to
211b2e6
Compare
@dependabot rebase |
abb7d84
to
c147dd2
Compare
b5b8f1a
to
d119d8c
Compare
Hello @melindaloubser1 , I'm wondering if this is going to be addressed soon, as I believe that it may resolve issues with running on the Mac M1 (see here : |
@dependabot rebase |
Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry! If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request |
@dependabot recreate |
417e244
to
cffb5ed
Compare
Ok seems it's mostly some type annotations in the code quality that block the checks from passing. Looking through the change logs for 1.20 and 1.21 I didn't find anything worrisome, if anything there should be more safeguards/errors now. Looking through the training logs I also found some depreciation warnings that we should take care of:
|
Well actually it's 70 mypy errors... definitely not something to do in an afternoon |
Bumps [numpy](https://github.com/numpy/numpy) from 1.19.5 to 1.21.6. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst.txt) - [Commits](numpy/numpy@v1.19.5...v1.21.6) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
6991838
to
98f6e89
Compare
"""Computes some statistics over the given numbers.""" | ||
return { | ||
"count": len(values) if values else 0, | ||
"mean": np.mean(values) if values else np.nan, | ||
"median": np.median(values) if values else np.nan, | ||
# [numpy-upgrade] type ignore can be removed after upgrading to numpy 1.23 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's many of these untyped function call mypy errors in 1.21. I tried 1.23 and they disappeared again, that's why I think it's okay to temporarily ignore them and then once we upgrade we can remove it again. Upgrading to >1.22, however, would also result in losing python 3.7 support
if isinstance(pickled_state, str): | ||
raise TypeError("np array __reduce__ returned string instead of tuple.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently this can happen according to the type checker - but the documentation is non-existent so I wasn't able to figure out when this might be the case.
batch_output: Dict[Text, Union[np.ndarray, Dict[Text, np.ndarray]]], | ||
) -> Dict[Text, Union[np.ndarray, Dict[Text, np.ndarray]]]: | ||
) -> Dict[Text, Union[np.ndarray, Dict[Text, Any]]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately it seems that the nesting isn't really limited - so I picked Any
@@ -441,7 +443,7 @@ def load( | |||
|
|||
@staticmethod | |||
def batch_to_model_data_format( | |||
batch: Union[Tuple[tf.Tensor, ...], Tuple[np.ndarray, ...]], | |||
batch: MaybeNestedBatchData, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type annotations here were imprecise since they never covered the case that the batch might be yet again nested in a tuple. All the methods leading to this function have still the old annotation, but it was never noticed since they just pass the data along and don't use it. I think these annotations should also be changed, but it's a lot of methods leading back to the batches coming out of the keras data iterator. So fixing those should be a different issue I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. I agree that fixing the entire chain is a separate issue - if you think it is important, could you create a follow up issue for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for persevering through the mypy changes!
You may need to rebase your branch then rerun poetry update
to resolve the conflicts in the lock file.
Whoop whoop!! 💯 |
@melindaloubser1 thanks for going ahead and merging, I was a bit behind on this! 🙌🌟 |
Bumps numpy from 1.19.5 to 1.21.6.
Release notes
Sourced from numpy's releases.
... (truncated)
Commits
ef0ec78
Merge pull request #21323 from charris/prepare-1.21.6-release24a8ec0
REL: Prepare for NumPy 1.21.6 release.68ff2d3
Merge pull request #21318 from charris/revert-2035430ba38c
REV: Revert pull request #20464 from charris/backport-203547cfef93
REL: prepare 1.21.x for further developmentc3d0a09
Merge pull request #20625 from charris/prepare-for-1.22.5d8dfa93
REL: Prepare for NumPy 1.21.5 release.e559d9a
Merge pull request #20618 from charris/backport-20616c2495e3
MAINT: Help boost::python libraries at least not crash8c04d2a
Merge pull request #20613 from charris/backport-20604Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)