This function will do nothing during (occurrence * delay) seconds. The Code Carbon API will be called every (measure_power_secs * api_call_interval) seconds.
(epochs: int)
| 9 | |
| 10 | |
| 11 | def train_model(epochs: int): |
| 12 | """ |
| 13 | This function will do nothing during (occurrence * delay) seconds. |
| 14 | The Code Carbon API will be called every (measure_power_secs * api_call_interval) |
| 15 | seconds. |
| 16 | """ |
| 17 | occurrence = epochs # 60 * 24 |
| 18 | delay = 30 # Seconds |
| 19 | for i in range(occurrence): |
| 20 | print(f"{occurrence * delay - i * delay} seconds before ending script...") |
| 21 | time.sleep(delay) |
| 22 | |
| 23 | |
| 24 | if __name__ == "__main__": |
no outgoing calls
no test coverage detected
searching dependent graphs…