Closed danielnorberg closed 3 months ago
@mwaskom gotcha, let me try moving it in to the main package
Done, ptal again.
There is a noticeable performance impact, seemingly mostly due to the call to Queue.put_nowait
. Could do some PyO3, but seems overkill for now as this telemetry will only run when task tracing is enabled.
To get a ballpark sense of the impact, with these below imports:
import kubernetes
import torch
import django
On a linux devbox running python 3.11, with tracing disabled:
imports took 1.5s
With tracing enabled:
imports took 1.8s
This is for ~3700 modules being imported in total.
Is there any reason not to put this into the main package as
modal._telemetry
(or wherever)? We're trying to consolidate everything in the client repo, as the "modern" way of distributing Python doesn't support multiple packages in one release.