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

Function heavy_computation

tests/test_tracking_inference.py:13–18  ·  view source on GitHub ↗
(run_time_secs: float = 3)

Source from the content-addressed store, hash-verified

11
12
13def heavy_computation(run_time_secs: float = 3):
14 end_time: float = (
15 time.perf_counter() + run_time_secs
16 ) # Run for `run_time_secs` seconds
17 while time.perf_counter() < end_time:
18 _ = 1e9 / 1e10
19
20
21def mock_load_model():

Callers 1

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