Skip to content

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Jan 27, 2022

No description provided.

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jan 27, 2022

💊 CI failures summary and remediations

As of commit c1059bc (more details on the Dr. CI page):


  • 1/1 failures introduced in this PR

1 failure not recognized by patterns:

Job Step Action
CircleCI cmake_macos_cpu curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
sh conda.sh -b
source $HOME/miniconda3/bin/activate
conda install -yq conda-build cmake
packaging/build_cmake.sh
🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

Copy link
Collaborator Author

@pmeier pmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are necessary when linting against numpy>=1.22, which is the latest version for Python >= 3.8. This was not caught by our CI, because we run 3.7 there.

pytorch_dep += "==" + os.getenv("PYTORCH_VERSION")

requirements = [
"typing_extensions",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmeier pmeier requested a review from datumbox January 28, 2022 09:44
@pmeier pmeier added dependency issue other if you have no clue or if you will manually handle the PR in the release notes labels Jan 28, 2022
@pmeier pmeier marked this pull request as ready for review January 28, 2022 09:45
@pmeier pmeier changed the title run mypy on Python 3.9 fix annotations for Python >= 3.8 Jan 28, 2022
padding: Union[int, List[int], Tuple[int, ...]],
fill: Optional[Union[float, List[float], Tuple[float, ...]]] = 0,
padding_mode: str = "constant",
padding_mode: Literal["constant", "edge", "reflect", "symmetric"] = "constant",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a new one for me, Literally.

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pmeier pmeier merged commit 8e874ff into pytorch:main Jan 28, 2022
@pmeier pmeier deleted the mypy-39 branch January 28, 2022 09:51
self.labels: Optional[np.ndarray]
if self.split == "train":
self.data, self.labels = self.__loadfile(self.train_list[0][0], self.train_list[1][0])
self.labels = cast(np.ndarray, self.labels)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have self.labels: Optional[np.ndarray] above, should we remove one of these?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that. Let me have a look.

facebook-github-bot pushed a commit that referenced this pull request Feb 3, 2022
Summary:
* run mypy on Python 3.9

* appease mypy

* Revert "run mypy on Python 3.9"

This reverts commit b935c83.

Reviewed By: kazhang

Differential Revision: D33927516

fbshipit-source-id: 07741549abeede756d941bdd105f8df3293e179e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/default cla signed dependency issue other if you have no clue or if you will manually handle the PR in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants