Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /mlco2_codecarbon /examples /api_call_demo.py
| import time | |
| from codecarbon import track_emissions | |
| def train_model(): | |
| """ | |
| This function will do nothing during (occurrence * delay) seconds. | |
| The Code Carbon API will be called every (measure_power_secs * api_call_interval) | |
| seconds. | |
| """ | |
| occurrence = 60 * 24 | |
| delay = 60 # Seconds | |
| for i in range(occurrence): | |
| print(f"{occurrence * delay - i * delay} seconds before ending script...") | |
| time.sleep(delay) | |
| if __name__ == "__main__": | |
| train_model() | |
Xet Storage Details
- Size:
- 666 Bytes
- Xet hash:
- f78d496f592390f04873d9c5a406fb2aacf9cab0b08f7a6f7a3c0844dde01220
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.