MCPcopy Create free account
hub / github.com/mlco2/codecarbon / train_model

Function train_model

examples/api_call_debug.py:14–23  ·  view source on GitHub ↗

This function will do nothing during (occurrence * delay) seconds. The Code Carbon API will be called every (measure_power_secs * api_call_interval) seconds.

()

Source from the content-addressed store, hash-verified

12 save_to_api=True,
13)
14def train_model():
15 """
16 This function will do nothing during (occurrence * delay) seconds.
17 The Code Carbon API will be called every (measure_power_secs * api_call_interval) seconds.
18 """
19 occurrence = 60 * 24 * 365 * 100 # Run for 100 years!
20 delay = 60 # Seconds
21 for i in range(occurrence):
22 print(f"{occurrence * delay - i * delay} seconds before ending script...")
23 time.sleep(delay)
24
25
26if __name__ == "__main__":

Callers 1

api_call_debug.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…