We get a warning in tests from vak.metrics.distance.functional.character_error_rate, basically because we call torch.tensor
tests/test_eval/test_frame_classification.py: 5 warnings
tests/test_learncurve/test_frame_classification.py: 8 warnings
tests/test_metrics/test_distance/test_functional.py: 6 warnings
tests/test_train/test_frame_classification.py: 4 warnings
/home/ildefonso/Documents/repos/vocalpy/vak-vocalpy/src/vak/metrics/distance/functional.py:100: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
return torch.tensor(rate, dtype=torch.float32)
I think the fix here is to do something like torch.FloatTensor instead of calling the torch.tensor constructor -- unless I'm confused the computed distance is a float, or maybe a numpy.float32?
I'm pretty sure we're not constructing from a tensor
We get a warning in tests from
vak.metrics.distance.functional.character_error_rate, basically because we calltorch.tensorI think the fix here is to do something like
torch.FloatTensorinstead of calling thetorch.tensorconstructor -- unless I'm confused the computed distance is a float, or maybe a numpy.float32?I'm pretty sure we're not constructing from a tensor