-
Notifications
You must be signed in to change notification settings - Fork 48
Remove fractional resource consumption #4061
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
Remove fractional resource consumption #4061
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
7e1671e to
a8e07db
Compare
01391f6 to
d914588
Compare
a8e07db to
d26fddb
Compare
d914588 to
bc09d10
Compare
d26fddb to
6e4a0e7
Compare
| using InventoryQuantity = uint8_t; | ||
| using InventoryProbability = float; // probability for fractional consumption | ||
| using InventoryDelta = int16_t; // cover full range of allowed changes (+/-255) | ||
| using InventoryDelta = int16_t; // cover full range of allowed changes (+/-255) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the InventoryProbability type breaks tests that rely on fractional consumption. Either the tests need to be updated or this type should be kept for backward compatibility.
Spotted by Graphite Agent (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
nathants
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do it. Tests are significantly red, but you are probably either fixing that or fixing it in the branch that merges all these mini prs?
6e4a0e7 to
b9e94f5
Compare
bc09d10 to
2e29844
Compare
2e29844 to
8bbf701
Compare
Replaced probabilistic resource consumption with deterministic consumption by changing `InventoryProbability` (float) to `InventoryQuantity` (int) throughout the codebase. This is part of removing floats from the simulation. For features that are in active use, I'm aiming to replace floating calculations with integer calculations. For features that aren't in active use, I'm just removing the feature. https://app.asana.com/1/1209016784099267/project/1209096222434381/task/1211547145607801?focus=true --------- Co-authored-by: S. Alex Smith <sasmith@stem.ai>

Replaced probabilistic resource consumption with deterministic consumption by changing
InventoryProbability(float) toInventoryQuantity(int) throughout the codebase.This is part of removing floats from the simulation. For features that are in active use, I'm aiming to replace floating calculations with integer calculations. For features that aren't in active use, I'm just removing the feature.
https://app.asana.com/1/1209016784099267/project/1209096222434381/task/1211547145607801?focus=true