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

Function heavy_computation

tests/test_custom_handler.py:9–14  ·  view source on GitHub ↗
(run_time_secs: int = 3)

Source from the content-addressed store, hash-verified

7
8
9def heavy_computation(run_time_secs: int = 3):
10 end_time: float = (
11 time.perf_counter() + run_time_secs
12 ) # Run for `run_time_secs` seconds
13 while time.perf_counter() < end_time:
14 pass
15
16
17class CustomOutput(BaseOutput):

Callers 2

dummy_train_modelMethod · 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…