Skip to content

Add numerical stability check #26

Open
@WangDeyao

Description

@WangDeyao

Hi!

I accidentally pass tensor with inf and nan values into the torchsearchsorted. Instead of throwing, the function actually outputs some tensor value. The output tensor is a DISASTER. Any operations on the output tensor will cause the entire process frozen. (For example, print the output vector). Not even ctrl-c can break it. I have to quickly kill the process to avoid further damage to the machine.

It would be great if you can add a simple check before the computation. Terminate the code if it finds there are nan or inf value exists.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions