(capacity_annotation)
return cpu_val, mem_val
Given pod annotations, extract the resource values for submission as metrics
    Example input: "0.25vCPU 0.5GB"
Given pod annotations, extract the resource values for submission as metrics
    Example input: "0.25vCPU 0.5GB"
Given pod annotations extract the resource values for submission as metrics Example input : 0 . 25vCPU 0 . 5GB
def extract_resource_values(capacity_annotation):
    """
    Given pod annotations, extract the resource values for submission as metrics
    Example input: "0.25vCPU 0.5GB"
    """
    cpu_val, mem_val = 0, 0
    capacities = capacity_annotation.split(" ")
    if len(capacities) != 2:
        return cpu_val, mem_val
    cpu, mem = capacities
    if cpu.endswith('vCPU'):
        cpu_val = float(cpu.strip('vCPU'))
    if mem.endswith('GB'):
        mem_val = float(mem.strip('GB'))
        mem_val *= GB_TO_BYTE_CONVERSION_FACTOR
    return cpu_val, mem_val
def extract_resource_values ( capacity_annotation ) : cpu_val , mem_val = 0 , 0 capacities = capacity_annotation . split ( " " ) if len ( capacities ) != 2 : return cpu_val , mem_val cpu , mem = capacities if cpu . endswith ( 'vCPU' ) : cpu_val = float ( cpu . strip ( 'vCPU' ) ) if mem . endswith ( 'GB' ) : mem_val = float ( mem . strip ( 'GB' ) ) mem_val *= GB_TO_BYTE_CONVERSION_FACTOR return cpu_val , mem_val