-
Notifications
You must be signed in to change notification settings - Fork 244
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
[batch] fix misnamed resources #13539
Conversation
I am having trouble determining the effect of this mistake, but it seems like we would be substantially undercharging for the serivce fee if it was really being charged by worker_fraction_in_1024ths instead of core-hours.
I think we're okay in terms of not having errors currently. This was a backwards compatibility code path. I will double check again, but I think we first create the config on the driver |
I think as long as these are correct, then we're okay: class GCPServiceFeeResource(ServiceFeeResourceMixin, GCPResource):
FORMAT_VERSION = 1
TYPE = 'gcp_service_fee'
@staticmethod
def product_name() -> str:
return 'service-fee'
class ServiceFeeResourceMixin(Resource, abc.ABC):
def to_quantified_resource(
self, cpu_in_mcpu: int, memory_in_bytes: int, worker_fraction_in_1024ths: int, external_storage_in_gib: int
) -> Optional[QuantifiedResource]: # pylint: disable=unused-argument
del memory_in_bytes, worker_fraction_in_1024ths, external_storage_in_gib
return {'name': self.name, 'quantity': cpu_in_mcpu} class GCPIPFeeResource(IPFeeResourceMixin, GCPResource):
FORMAT_VERSION = 1
TYPE = 'gcp_ip_fee'
@staticmethod
def product_name(base: int) -> str:
return f'ip-fee/{base}'
class IPFeeResourceMixin(Resource, abc.ABC):
def to_quantified_resource(
self, cpu_in_mcpu: int, memory_in_bytes: int, worker_fraction_in_1024ths: int, external_storage_in_gib: int
) -> Optional[QuantifiedResource]: # pylint: disable=unused-argument
del cpu_in_mcpu, memory_in_bytes, external_storage_in_gib
return {'name': self.name, 'quantity': worker_fraction_in_1024ths} |
Also, I did a GPU experiment with Sophie where she ran a preemptible and nonpreemptible job for an hour:
|
I am having trouble determining the effect of this mistake, but it seems like we would be substantially undercharging for the serivce fee if it was really being charged by worker_fraction_in_1024ths instead of core-hours.