Skip to content

Conversation

@mruberry
Copy link
Collaborator

After being deprecated in 1.5 and throwing a runtime error in 1.6, we can now enable torch.full inferring its dtype when given bool and integer fill values. This PR enables that inference and updates the tests and docs to reflect this.

@dr-ci
Copy link

dr-ci bot commented Jul 23, 2020

💊 CI failures summary and remediations

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


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 18 times.

Mike Ruberry added 2 commits July 23, 2020 01:54
@mruberry mruberry requested a review from gchanan July 23, 2020 20:43
ScalarType::ComplexFloat;
return options.dtype(scalar_type);
} else {
return options.dtype(get_default_dtype());
Copy link
Contributor

Choose a reason for hiding this comment

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

do you need to do this? Presumably it was working before without this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It did and we could safely leave this out. I included it for consistency and readability.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mruberry merged this pull request in 6b3f335.

@albanD
Copy link
Collaborator

albanD commented Jul 29, 2020

@mruberry
#38011 landed before this one and enabled "warning as error" for the doc. So because this PR introduces new doc warnings, it failed on master.
The failing job is here and the exact warning is:

Jul 29 07:30:45 /opt/conda/lib/python3.6/site-packages/torch/__init__.py:docstring of torch.full:: WARNING: more than one target found for cross-reference 'bool': torch.FloatStorage.bool, torch.Tensor.bool

@mruberry
Copy link
Collaborator Author

Thanks @albanD! Darn merge conflicts.

@mruberry mruberry reopened this Jul 29, 2020
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@mruberry mruberry deleted the enable_full_dtype_inference branch August 21, 2020 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants