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

TypeError with pytest #32

Closed
JustinShenk opened this issue Aug 22, 2021 · 2 comments
Closed

TypeError with pytest #32

JustinShenk opened this issue Aug 22, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@JustinShenk
Copy link
Member

JustinShenk commented Aug 22, 2021

Running py.test,

if np.all(np.isnan(df.values[0])):
returns a TypeError:

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''.

Contents of df.values[0]:

array([list([(tensor(-1.5482e-08, dtype=torch.float64), tensor(-1.3955e-09, dtype=torch.float64)), (tensor(-2.5362e-08, dtype=torch.float64), tensor(-2.5179e-09, dtype=torch.float64)), (tensor(-3.1511e-08, dtype=torch.float64), tensor(-3.6894e-09, dtype=torch.float64)), (tensor(-3.5553e-08, dtype=torch.float64), tensor(-4.1750e-09, dtype=torch.float64)), (tensor(-3.8271e-08, dtype=torch.float64), tensor(-4.4061e-09, dtype=torch.float64)), (tensor(-3.7972e-08, dtype=torch.float64), tensor(-2.7664e-09, dtype=torch.float64)), (tensor(-3.7489e-08, dtype=torch.float64), tensor(-1.7852e-09, dtype=torch.float64)), (tensor(-3.7178e-08, dtype=torch.float64), tensor(-1.3027e-09, dtype=torch.float64))])],
      dtype=object)
@JustinShenk JustinShenk added the bug Something isn't working label Aug 22, 2021
@MLRichter
Copy link
Collaborator

Hi, posted an update. I kept the try catch block, since I want this tool to be as non-blocking as possible for the training.
However the stack trace should now be logged correctly. Also, the tested scenario is now caught over if-else, similar to the code you posted.

@JustinShenk
Copy link
Member Author

Closed by #41

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

2 participants