You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a couple of packages that Cirq uses that have slow import times, but are not heavily used. These include a lot of subpackages of scipy, like scipy.optimize and scipy.stats. Currently we lazily import these before their use in order to avoid these being imported in the global init of cirq. See #4643 for example.
Description of the issue
There are a couple of packages that Cirq uses that have slow import times, but are not heavily used. These include a lot of subpackages of scipy, like scipy.optimize and scipy.stats. Currently we lazily import these before their use in order to avoid these being imported in the global init of cirq. See #4643 for example.
However @MichaelBroughton suggested that we do this the way that TensorFlow does this, using the following class
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/util/lazy_loader.py#L23
We should consider doing this, and if so we do we should also test the LazyLoader class.
The text was updated successfully, but these errors were encountered: