Closed ajagann closed 1 year ago
Thanks for your bug report !
You use the field CPU name
, but you provide a model range. If you want to use the xeon gold
or xeon platinum
please use the model_range
field. What happens is that the API is trying to retrieve a cpu named xeon gold, don't find it and use the default parameters.
If you want to provide the CPU name, the API will complete the model_range
for you. Here is a list of the CPU names we support : https://github.com/Boavizta/boaviztapi/blob/main/boaviztapi/data/components/cpu_index.csv
{
"model_range": "xeon gold"
}
{
"impacts": {
"gwp": {
"manufacture": 21.7,
"use": 310,
"unit": "kgCO2eq"
},
"pe": {
"manufacture": 325,
"use": 10670,
"unit": "MJ"
},
"adp": {
"manufacture": 0.02,
"use": 0.0000532,
"unit": "kgSbeq"
}
},
"verbose": {
"units": 1,
"manufacture_impacts": {
"gwp": {
"value": 21.7,
"unit": "kgCO2eq"
},
"pe": {
"value": 325,
"unit": "MJ"
},
"adp": {
"value": 0.02,
"unit": "kgSbeq"
}
},
"core_units": {
"value": 24,
"unit": "none",
"status": "DEFAULT",
"source": null
},
"die_size_per_core": {
"value": 0.245,
"unit": "mm2",
"status": "DEFAULT",
"source": null
},
"model_range": {
"value": "xeon gold",
"unit": "none",
"status": "INPUT",
"source": null
},
"USAGE": {
"usage_impacts": {
"gwp": {
"value": 310,
"unit": "kgCO2eq"
},
"pe": {
"value": 10670,
"unit": "MJ"
},
"adp": {
"value": 0.0000532,
"unit": "kgSbeq"
}
},
"hours_electrical_consumption": {
"value": 94.624,
"unit": "W",
"status": "COMPLETED",
"source": null
},
"time_workload": {
"value": 50,
"unit": "%",
"status": "DEFAULT",
"source": null
},
"usage_location": {
"value": "EEE",
"unit": "CodSP3 - NCS Country Codes - NATO",
"status": "DEFAULT",
"source": null
},
"adp_factor": {
"value": 6.42e-8,
"unit": "KgSbeq/kWh",
"status": "COMPLETED",
"source": "ADEME BASE IMPACT"
},
"gwp_factor": {
"value": 0.38,
"unit": "kgCO2e/kWh",
"status": "COMPLETED",
"source": "https://www.sciencedirect.com/science/article/pii/S0306261921012149 : \nAverage of 27 european countries"
},
"pe_factor": {
"value": 12.874,
"unit": "MJ/kWh",
"status": "COMPLETED",
"source": "ADPf / (1-%renewable_energy)"
},
"use_time": {
"value": 8760,
"unit": "hours",
"status": "DEFAULT",
"source": null
},
"params": {
"value": {
"a": 35.5688,
"b": 0.2438,
"c": 9.6694,
"d": -0.6087
},
"unit": "none",
"status": "COMPLETED",
"source": "From CPU model range"
}
}
}
}
I believe the documentation is not explicit enough. Please feel free to point out what was unclear for you.
You remind me that I should update documentation with the last version of the parameters (https://github.com/Boavizta/boaviztapi/blob/main/boaviztapi/data/consumption_profile/cpu/cpu_profile.csv)
Thank you for clarifying! Where I went wrong was that I didn't quite understand the difference between how model_range and name were to be used. In the documentation, all the examples use the 'name' field, so I suppose I assumed that was the key I needed to use. It might help to add an API call to retrieve CPU names. Right now, I only see a call to retrieve all the possible model ranges.
Bug description
Calling the API to retrieve the component CPU characteristics for different Xeon CPUs results in identical information.
To Reproduce
Selected two Xeon models from the result of calling
/v1/utils/cpu_model_range
. I chose Xeon Platinum and Xeon Gold.produces an identical output to
Expected behavior
I'm expecting to see at least see these differences in parameter values which are listed in the Boadvizta documentation (https://doc.api.boavizta.org/Explanations/components/cpu/)
JSON OUTPUT
Output for Xeon Gold
Output for Xeon Platinum
Additional context