Skip to content
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

Warning when copying a tensor in the base sampler #188

Open
yukw777 opened this issue Dec 23, 2019 · 0 comments
Open

Warning when copying a tensor in the base sampler #188

yukw777 opened this issue Dec 23, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@yukw777
Copy link
Contributor

yukw777 commented Dec 23, 2019

Describe the bug
The base sampler produces the following warning:

py.warnings [block_train] /home/ubuntu/.local/lib/python3.6/site-packages/flambe/sampler/base.py:167: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().re
quires_grad_(True), rather than torch.tensor(sourceTensor).
  tensors = [torch.tensor(example) for example in column]

To Reproduce
Steps to reproduce the behavior:
Simply run the base sampler with verbose logging.

Expected behavior
There should be no warning.

Screenshots
N/A

Software Versions (please complete the following information):

  • OS: Ubuntu 18.04
  • Python Version 3.6.8
  • PyTorch Version 1.1
  • Flambé Version 0.4.8

Additional context
N/A

@yukw777 yukw777 added the bug Something isn't working label Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant