related question to the above. with `@kubernetes` ...
# ask-metaflow
m
related question to the above. with
@kubernetes
the cpu request seems to restricted to int() types, so again fractional cpu like
0.25
or
250m
, return errors.
👀 1
b
can you provide some more details on the issue, as from a quick glance in the code, and after testing, floats (both as string and as float) seem to be working as expected for the cpu attribute of the decorator. The only value that does not work is the string format milliCPU units that Kubernetes supports, but these are interchangeable with floats.
there is an issue with specifying fractions <1 if combining with the resources decorator though, as the current logic tries to pick the max out of values between the two decorators, so this won't yield results:
Copy code
@resources(cpu=0.25)
@kubernetes
@step
due to the kube deco having a cpu=1 default which overrides the smaller one from the resources deco in this case.
There have been some thoughts around reworking this logic for the resources decorator, but pointing this out as a possible culprit as well.
m
thanks @bulky-afternoon-92433 that's really good to know. CC @acoustic-van-30942
👍 1