Skip to content

Conversation

@qizzzh
Copy link

@qizzzh qizzzh commented Aug 28, 2020

Summary:
Since it's single element.. In some cases we may not be able to resize the
buffers.

Test Plan: waiting for unit tests

Differential Revision: D23393108

Summary:
Since it's single element.. In some cases we may not be able to resize the
buffers.

Test Plan: waiting for unit tests

Differential Revision: D23393108

fbshipit-source-id: e4fdc94589a04494aa9d7988afef3988fd6e6082
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D23393108

quant_max=quant_max)
self.register_buffer('min_val', torch.tensor([]))
self.register_buffer('max_val', torch.tensor([]))
self.register_buffer('min_val', torch.tensor(float('inf')))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we serialize tensors with inf/-inf correctly?

Copy link
Author

Choose a reason for hiding this comment

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

Seems ok

>>> m
EmbeddingBag(1, 2, mode=mean)
>>> m.register_buffer("v", torch.tensor([float('inf')]))
>>> m.v
tensor([inf])
>>> ms = torch.jit.script(m)
>>> ms
RecursiveScriptModule(original_name=EmbeddingBag)
>>> ms.v
tensor([inf])
>>> torch.jit.save(ms, "/tmp/test.pt")
>>> ms_2 = torch.jit.load("/tmp/test.pt")
>>> ms_2.v
tensor([inf])

@dr-ci
Copy link

dr-ci bot commented Aug 28, 2020

💊 CI failures summary and remediations

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


  • 2/2 failures possibly* introduced in this PR
    • 2/2 non-CircleCI failure(s)

1 failure confirmed as flaky and can be ignored:

  • pytorch_linux_bionic_py3_6_clang9_test

Extra GitHub checks: 1 failed


codecov.io: 1 failed


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 6 times.

Copy link
Contributor

@supriyar supriyar left a comment

Choose a reason for hiding this comment

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

lgtm, if all tests pass

@codecov
Copy link

codecov bot commented Aug 28, 2020

Codecov Report

Merging #43789 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #43789      +/-   ##
==========================================
- Coverage   69.34%   69.33%   -0.02%     
==========================================
  Files         378      378              
  Lines       46698    46692       -6     
==========================================
- Hits        32383    32374       -9     
- Misses      14315    14318       +3     
Impacted Files Coverage Δ
torch/quantization/observer.py 91.08% <100.00%> (-0.12%) ⬇️
torch/utils/_benchmark/utils/common.py 77.31% <0.00%> (-1.69%) ⬇️
torch/testing/_internal/expecttest.py 77.55% <0.00%> (-1.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b72da0c...181492d. Read the comment docs.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in f73ba88.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants