Closed neilb22 closed 1 year ago
Hi,
It seems that your Sionna installation does not have the config module which is strange as it is included in v0.14.
Could you run the following code and post the output?
import sionna
print(sionna.__version__)
dir(sionna)
Hi Jakob. Thank you for the prompt response.
This is the output that I get if I run the code you mentioned:
0.14.0
['Config',
'DIELECTRIC_PERMITTIVITY_VACUUM',
'H',
'PI',
'SPEED_OF_LIGHT',
'__builtins__',
'__cached__',
'__doc__',
'__file__',
'__loader__',
'__name__',
'__package__',
'__path__',
'__spec__',
'__version__',
'channel',
'config',
'fec',
'mapping',
'mimo',
'nr',
'ofdm',
'rt',
'signal',
'utils']
Hm, this is strange. It should work. Are you running the notebook without any modifications? I have just tested it locally as well as on Google Colab and cannot reproduce your error.
Could you try this code?
import sionna
import tensorflow as tf
from sionna.utils import matrix_inv
matrix_inv(tf.eye(5))
I didn't modify it before I raised the issue here. But, just to be sure, I re-downloaded the notebook and tried again. The config error still shows up for the Equalizer.
For the code you shared, I get an output:
<tf.Tensor: shape=(5, 5), dtype=float32, numpy=
array([[1., 0., 0., 0., 0.],
[0., 1., 0., 0., 0.],
[0., 0., 1., 0., 0.],
[0., 0., 0., 1., 0.],
[0., 0., 0., 0., 1.]], dtype=float32)>
This may or may not be relevant, but when I installed 0.14.0, the earlier version of Sionna (0.13.1 I think) was still there. So I did a "pip uninstall sionna", which removed the older version but kept 0.14.0. Maybe that is the reason? Uninstalling it may have affected the config file in some way, but this is an assumption, and I could be totally wrong.
Would uninstalling and re-installing Sionna fix this issue?
There is no config file or anything like this. The config module has a variable that determines how certain functions are implemented depending on the execution mode (eager, graph, XLA).
I would simply do a clean installation and a new enviroment.
BTW, could you run this code snippet :
import sionna
import tensorflow as tf
from sionna.utils import matrix_sqrt_inv
matrix_sqrt_inv(tf.eye(5))
I see. Thank you for the explanation. I will set up a new environment and do a fresh installation then.
I get the following message for the code you shared:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [20], in <cell line: 4>()
2 import tensorflow as tf
3 from sionna.utils import matrix_sqrt_inv
----> 4 matrix_sqrt_inv(tf.eye(5))
File ~\Anaconda3\envs\Sionna\lib\site-packages\sionna\utils\tensors.py:242, in matrix_sqrt_inv(tensor)
216 def matrix_sqrt_inv(tensor):
217 r""" Computes the inverse square root of a Hermitian matrix.
218
219 Given a batch of Hermitian positive definite matrices
(...)
240 See :py:attr:`~sionna.Config.xla_compat`.
241 """
--> 242 if sn.config.xla_compat and not tf.executing_eagerly():
243 s, u = tf.linalg.eigh(tensor)
245 # Compute 1/sqrt of eigenvalues
AttributeError: module 'sionna' has no attribute 'config'
Kind regards, Neil
So, there is something strange going on with your installation. When you run dir(sionna)
, you see the config module but then your code says that I cannot find it. A fresh installation should solve this.
I did a fresh installation in a new environment. I now get a different error related to the LLVM backend being inactive, similar to #107 . This is after following the installation steps that were mentioned in the Sionna documentation (pip install --upgrade ipykernel
thing) and restarting the Jupyter notebook.
Since that is different from this issue, should I close this issue? The LMMSE Equalizer still shows throws the Attribute error, but all cells before that seem to work.
I also tried to run "5G_NR_PUSCH.ipynb" installing "sionna" in local environment and faced the same issue. Later, I uninstalled the "sionna" module and run"5G_NR_PUSCH.ipynb" downloading source code. It works for me.
Hi All,
I was attempting to run the Sionna Tutorial on "Part 3: Advanced Link-Level Simulations" when I encountered this error in the LMMSE Equalizer. The notebook was taken directly from the site. The Sionna version I am using is 0.14.0.
Any suggestions on what I should do so that I can use this equalizer?