Closed arjan-hada closed 2 years ago
Please list the specific version of daft, Python, and matplotlib. Then give an executable example with the full error traceback.
Same problem today, it seems that daft.pgm
expects a shape parameter but isn't offered one in a tutorial linked below
Python 3.7.12
Matplotlib 3.2.2
Daft 0.0.4
Used script from this tutorial and the following error was returned, from the first line.
pgm = daft.PGM()
>>>
TypeError Traceback (most recent call last)
<ipython-input-13-06303411a32e> in <module>()
2
3 # Instantiate the PGM.
----> 4 pgm = daft.PGM()
5
6 # # Hierarchical parameters.
TypeError: __init__() missing 1 required positional argument: 'shape'
Thanks for looking into this!
Actually, error resolves itself with Daft 0.1.2
I am working on google colab as PyMC3 is not supported on my Mac. I downloaded the latest daft version with the command "!pip install daft==0.1.2" but I still get the same error. Do you have any suggestions?
What do you get when you run
import daft
print(daft.__version__)
in your Colab notebook? The Colab environment includes v0.0.4 :/ by default, so you may need to install (I use %pip install -U daft
) and then restart your kernel. I find that if I do that everything works.
Thank you, but it didn't help :(
That's cause you didn't restart your kernel!
Touché! I'm a newbie. Thanks a lot 👍
Excellent - glad you got it working!!
The docs say the shape is an optional parameter for daft.PGM(). however, when executing "daft.PGM()" I get the following error: TypeError: init() missing 1 required positional argument: 'shape'