-
Notifications
You must be signed in to change notification settings - Fork 9
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
What (should) happen at 48 hrs? #32
Comments
Our first 'live' bug report I think! 🍾
No, at least this is not my understanding of what whould happen If the returned values of carbon intensities with For instance if your job's duration is 3 hours (cats
Couldn't agree more - this stuff is easy to get almost right :) |
(I've nothing helpful to add here right now, but 💯 for the use of LaTeX in markdown Thibault, I did not know that was possible!) |
@tlestang's approach reduces the scope for when longer jobs can run but guarantees that you get a sensible answer. Two thoughts on other approaches:
|
Currently the def writecsv(...):
# ...
return cat_converter(outputfile, "simple", duration) The 'simple' method just returns the time corresponding to the minimum of the timeseries -- not the minimum of running average over the job runtime: def cat_converter(...):
# ...
if method == "simple":
# Return element with smallest 2nd value
# if multiple elements have the same value, return the first
rtn = min(data, key=lambda x: x[1])
rtn = {
"timestamp": rtn[0],
"carbon_intensity": rtn[1],
"est_total_carbon": rtn[1],
} So yeah - if the min carbon intensity is the last data point, |
This has probably been resolved in #43 (to ensure that jobs complete within the 48 hour forecast), but there doesn't appear to be a test for it. Has anybody written a test that covers this? Is it in the main branch? |
Directly following the CW2023 hackathon, cats internally implemented two methods of determining the job start time:
The second behaviour is what is actually expected from cats, but the first one has been the default for a while until #55 and d9fdddd6 were merged in. The behaviour originally described by @andreww makes sense if cats just returned the minimum of the carbon intensity forecast dependently of job duration. That's not the case anymore, see cats/optimise_starttime.py. In terms of testing, I'm not sure what to add in addition to tests in |
Last week @Llannelongue suggested we create a test where the carbon intensity continuously falls over the 48 hour forecast. The correct behaviour would be that a 48 hour job gets scheduled to run at the start of the 48 hour period, not the end of it. |
Related: #99 |
I've just done a demo of this and it turned out that the lowest carbon intensity predicted for Oxford was in 48 hrs time (the last half hour returned by the API). Currently we choose to schedule the start of the task then. Is this what we want to happen?
Probably worth thinking about some of this kind of edge case, and cooking up some example csv files so we can test them. But deciding what to do isn't obvious to me.
The text was updated successfully, but these errors were encountered: