quick-lighter-52296
08/16/2022, 5:36 AM# Use Decimals to compare and convert to string here so
# that numbers that can't be exactly represented as
# floats (e.g. 0.8) still look "nice". We don't care
# about precision more that .001 for resources anyway.
result[k] = str(max(float(my_val or 0), float(v or 0)))
With this change we are no longer able to deploy to AWS SFN.
Example: @resource(cpp=1, memory=2048)
On step-functions deploy
the following error is received (not attaching full stack trace for brevity):
if int(gpu) > 0:
ValueError: invalid literal for int() with base 10: '0.0'
The reason this happens is because gpu=0
, which gets converted to "0.0"
by the above culprit line. The gpu resolver fails to parse it as an int any more and breaksaverage-beach-28850
08/16/2022, 2:31 PMaverage-beach-28850
08/16/2022, 2:31 PMaverage-beach-28850
08/19/2022, 1:31 AMaverage-beach-28850
08/25/2022, 2:49 PM