# Problem of resolving tensorflow\_probability distributions in Vscode

**URL:** <https://discuss.ai.google.dev/t/problem-of-resolving-tensorflow-probability-distributions-in-vscode/23848>\
**Category:** General Discussion\
**Tags:** tf-probability, help\_request\
**Created:** [November 17, 2022, 5:01am UTC](https://discuss.ai.google.dev/t/problem-of-resolving-tensorflow-probability-distributions-in-vscode/23848 "2022-11-17T05:01:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![XIAOXU\_FENG](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/xiaoxu_feng/32/11353_2.png) [@XIAOXU\_FENG](https://discuss.ai.google.dev/u/XIAOXU_FENG)\
**Post date:** [November 17, 2022, 5:01am UTC](https://discuss.ai.google.dev/t/problem-of-resolving-tensorflow-probability-distributions-in-vscode/23848/1 "2022-11-17T05:01:29Z")

</div>

Hi,

I am using

```auto
from tensorflow_probability import distributions as tfd

```

in vscode,

but the vscode resolves distributions as a variable with ModuleType instead of a Module,  
so that it can not find subclasses of distributions.

By finding the definition of this `distributions`,  
it points to `tensorflow_probability/python/ __init__.py` line 82,  
where `distributions` is given the `types.ModuleType`

It seems that those submodules of `tensorflow_probability` are lazily loaded,  
but I am sorry I am not familiar with lazy loading.

I wonder how to import the `distributions` and other subclass of `tensorflow_probability` as normal module so that the IDE can find subclass of distributions for autocompletion.

Appreciate any helps!

The version of tensorflow is 2.10,  
the version of tensorflow\_probability is 0.18.0

---

<div class="post-metadata">

**Author:** ![Divya\_Sree\_Kayyuri](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/divya_sree_kayyuri/32/29791_2.png) [@Divya\_Sree\_Kayyuri](https://discuss.ai.google.dev/u/Divya_Sree_Kayyuri)\
**Post date:** [September 24, 2025, 5:25am UTC](https://discuss.ai.google.dev/t/problem-of-resolving-tensorflow-probability-distributions-in-vscode/23848/3 "2025-09-24T05:25:54Z")

</div>

Hi @XIAOXU_FENG , Thank you for your patience, and apologies for the late reply.  
This issue is old, the information might be outdated. Please try with the latest versions and hardware and check if the error still occurs. [TensorFlow Distribution](https://www.tensorflow.org/probability/examples/TensorFlow_Distributions_Tutorial) is now part of TensorFlow Probability module. You can access it directly after installing `Tensorflow Probability`.
