-
Notifications
You must be signed in to change notification settings - Fork 100
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
overflow in utility term calculation #842
Comments
Also, I'm not clear whether this overflow is a new problem created by over-zealous down casting dtypes to save memory, or if it pre-dates the datatype optimization. I'm not sure what the best fix is here either ... we could circumvent this one specific problem by up-casting the variables in this one expression of this one spec file, but the wider problem would remain lurking, so it's probably advisable not to do that. |
Utility difference is reported in this expression: The value of The This is not a new problem introduced by the Phase 8 data type optimization. Downcasting numeric dtype is turned off by default for all runs due to reasons like this. Looking at the commit history, the dtype for |
There is a potential problem in utility calculations for non-sharrow evaluation: When an expression is an evaluation of two int8 values, the pandas.eval engine preserves the datatype in the result, even if it triggers an overflow. For example, in the error @i-am-sijia found below, the problem occurs when evaluating
num_escort_tours * start
. Both operands have an original dtype ofnp.int8
, and so result ofdf.eval('num_escort_tours * start')
also has a dtype ofnp.int8
. But in this case, the maximum "correct" value for a few rows of the result exceeds 127, causing an overflow.When using Sharrow, this overflow does not occur (intermediate calculations are promoted to float as sharrow knows they are about to be multiplied against a float coefficient anyhow). BUT this then triggers disagreement between sharrow and non-sharrow, which stops the run in 'test' mode.
Originally posted by @i-am-sijia in #839 (comment)
The text was updated successfully, but these errors were encountered: