Closed trent-s closed 1 month ago
@trent-s
Thanks for your report! Did you configure Electricity Maps as a data source, right?
@vaughanknight @danuw @tiwatsuka
I guess it is caused by null value in carbon intensity what Scott suggested. Carbon intensity in HistoryCarbonIntensityData
is defined as following:
What do you think?
@YaSuenag Thank you for your kind consideration. Yes I was using Electricity Maps for the data source. Thanks!
@vaughanknight @danuw @tiwatsuka
I pushed fix proposal as https://github.com/YaSuenag/carbon-aware-sdk/commit/ba68e52a4ee133ba52323ba7ca65fce3eb10027f . I can send PR if it looks good.
I didn't remove the data which carbonIntensity
is null
because EM datasource calcurates the duration from time differense between 2 elements in the array of the result. It should be kept to know valid duration.
@YaSuenag to create a PR so we can review the change and try and keep as primary focus. Thanks
Thank you very much!
@trent-s Thanks again for your report!
FYI: Carbon Aware SDK provides container image like a snapshot image. You can use it if you want to use fixed version without building. Use pre
tag in GHCR: https://github.com/Green-Software-Foundation/carbon-aware-sdk/pkgs/container/carbon-aware-sdk
pre
container would be built when the commit happens in dev
(default) branch.
I really appreciate your excellent work and useful information!
Contact Details
trent@jp.ibm.com
What happened?
Thank you for your excellent work on this highly beneficial project! I would like to report code behavior which might possibly be improved. Thank you for your assistance with this.
Using the latest Carbon Aware SDK installed on OpenShift via Helm Cart, sometimes the query returns an error. When querying with a different location, or trying late, the problem often goes away. (All locations are valid locations reported by the
locations
endpoint.Rather than displaying an error, it would be nice if the SDK took kind of action to return usable if reduced data. e.g., ignore null values, or possibly replace a null value with the average of surrounding values.
Example of error output:
Example of working query:
Possibly irrelevant, but when this error happens, the json string returned from the http call found in the log seems to always include
"carbonIntensity":null
. For example see the last stanza(segment?) of this json string:client
WebAPI (Default)
Relevant log output
Code of Conduct