Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running run_hackett_inference.py #13

Closed
augeorge opened this issue Apr 17, 2024 · 6 comments · Fixed by #14
Closed

Error when running run_hackett_inference.py #13

augeorge opened this issue Apr 17, 2024 · 6 comments · Fixed by #14
Assignees
Labels
bug Something isn't working

Comments

@augeorge
Copy link
Contributor

augeorge commented Apr 17, 2024

I created a new environment and installed packages using python -m pip install -e . after cloning the repo.

When I run try to run run_hackett_inference.py I get the following error (showing the full output):

(emll_env) (base) geor228@WE49311 notebooks % /Users/geor228/miniconda3/envs/emll_env/bin/python /Users/geor228/Github/emll/notebooks/run_hackett_inference.py
WARNING (pytensor.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
Traceback (most recent call last):
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/tensor/elemwise.py", line 438, in get_output_info
    [
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/tensor/elemwise.py", line 439, in <listcomp>
    broadcast_static_dim_lengths(shape)
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/tensor/utils.py", line 162, in broadcast_static_dim_lengths
    raise ValueError
ValueError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/geor228/Github/emll/notebooks/run_hackett_inference.py", line 142, in <module>
    hist = approx.fit(
           ^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pymc/variational/inference.py", line 149, in fit
    step_func = self.objective.step_function(score=score, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/configparser.py", line 47, in res
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pymc/variational/opvi.py", line 379, in step_function
    updates = self.updates(
              ^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pymc/variational/opvi.py", line 268, in updates
    self.add_obj_updates(
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pymc/variational/opvi.py", line 316, in add_obj_updates
    grads = pm.updates.get_or_compute_grads(obj_target, self.obj_params + more_obj_params)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pymc/variational/updates.py", line 177, in get_or_compute_grads
    return pytensor.grad(loss_or_grads, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 607, in grad
    _rval: Sequence[Variable] = _populate_grad_dict(
                                ^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1407, in _populate_grad_dict
    rval = [access_grad_cache(elem) for elem in wrt]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1407, in <listcomp>
    rval = [access_grad_cache(elem) for elem in wrt]
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1037, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1192, in access_term_cache
    input_grads = node.op.L_op(inputs, node.outputs, new_output_grads)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/scan/op.py", line 2569, in L_op
    dC_dinps_t = compute_all_gradients(known_grads)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/scan/op.py", line 2483, in compute_all_gradients
    grads = grad(
            ^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 607, in grad
    _rval: Sequence[Variable] = _populate_grad_dict(
                                ^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1407, in _populate_grad_dict
    rval = [access_grad_cache(elem) for elem in wrt]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1407, in <listcomp>
    rval = [access_grad_cache(elem) for elem in wrt]
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1362, in access_grad_cache
    term = access_term_cache(node)[idx]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/gradient.py", line 1192, in access_term_cache
    input_grads = node.op.L_op(inputs, node.outputs, new_output_grads)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/Github/emll/src/emll/pytensor_utils.py", line 105, in L_op
    A_bar = force_outer(b - A.dot(c), x) - force_outer(b_bar, c)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/tensor/variable.py", line 125, in __sub__
    return pt.math.sub(self, other)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/graph/op.py", line 292, in __call__
    node = self.make_node(*inputs, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/tensor/elemwise.py", line 482, in make_node
    out_dtypes, out_shapes, inputs = self.get_output_info(DimShuffle, *inputs)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geor228/miniconda3/envs/emll_env/lib/python3.11/site-packages/pytensor/tensor/elemwise.py", line 444, in get_output_info
    raise ValueError(
ValueError: Incompatible Elemwise input shapes [(192, 203), (192, 192)]

I'm using python 3.11.8 on a M2 pro macbook running macOS sonoma 14.4.2.

For reference here's my current conda environment:

(emll_env) (base) geor228@WE49311 notebooks % conda list
# packages in environment at /Users/geor228/miniconda3/envs/emll_env:
#
# Name                    Version                   Build  Channel
annotated-types           0.6.0                    pypi_0    pypi
anyio                     4.3.0                    pypi_0    pypi
appdirs                   1.4.4                    pypi_0    pypi
arviz                     0.18.0                   pypi_0    pypi
bzip2                     1.0.8                h80987f9_5  
ca-certificates           2024.3.11            hca03da5_0  
cachetools                5.3.3                    pypi_0    pypi
certifi                   2024.2.2                 pypi_0    pypi
cloudpickle               3.0.0                    pypi_0    pypi
cobra                     0.29.0                   pypi_0    pypi
cons                      0.4.6                    pypi_0    pypi
contourpy                 1.2.1                    pypi_0    pypi
cycler                    0.12.1                   pypi_0    pypi
cython                    3.0.10                   pypi_0    pypi
depinfo                   2.2.0                    pypi_0    pypi
diskcache                 5.6.3                    pypi_0    pypi
dm-tree                   0.1.8                    pypi_0    pypi
emll                      0.1.1.dev0               pypi_0    pypi
etuples                   0.3.9                    pypi_0    pypi
filelock                  3.13.4                   pypi_0    pypi
fonttools                 4.51.0                   pypi_0    pypi
future                    1.0.0                    pypi_0    pypi
h11                       0.14.0                   pypi_0    pypi
h5netcdf                  1.3.0                    pypi_0    pypi
h5py                      3.11.0                   pypi_0    pypi
httpcore                  1.0.5                    pypi_0    pypi
httpx                     0.27.0                   pypi_0    pypi
idna                      3.7                      pypi_0    pypi
importlib-resources       6.4.0                    pypi_0    pypi
kiwisolver                1.4.5                    pypi_0    pypi
libffi                    3.4.4                hca03da5_0  
logical-unification       0.4.6                    pypi_0    pypi
markdown-it-py            3.0.0                    pypi_0    pypi
matplotlib                3.8.4                    pypi_0    pypi
mdurl                     0.1.2                    pypi_0    pypi
minikanren                1.0.3                    pypi_0    pypi
mpmath                    1.3.0                    pypi_0    pypi
multipledispatch          1.0.0                    pypi_0    pypi
ncurses                   6.4                  h313beb8_0  
numpy                     1.26.4                   pypi_0    pypi
openssl                   3.0.13               h1a28f6b_0  
optlang                   1.8.1                    pypi_0    pypi
packaging                 24.0                     pypi_0    pypi
pandas                    2.2.2                    pypi_0    pypi
patsy                     0.5.6                    pypi_0    pypi
pillow                    10.3.0                   pypi_0    pypi
pip                       23.3.1          py311hca03da5_0  
pydantic                  2.7.0                    pypi_0    pypi
pydantic-core             2.18.1                   pypi_0    pypi
pygments                  2.17.2                   pypi_0    pypi
pymc                      5.13.1                   pypi_0    pypi
pyparsing                 3.1.2                    pypi_0    pypi
pytensor                  2.20.0                   pypi_0    pypi
python                    3.11.8               hb885b13_0  
python-dateutil           2.9.0.post0              pypi_0    pypi
python-libsbml            5.20.2                   pypi_0    pypi
pytz                      2024.1                   pypi_0    pypi
readline                  8.2                  h1a28f6b_0  
rich                      13.7.1                   pypi_0    pypi
ruamel-yaml               0.18.6                   pypi_0    pypi
ruamel-yaml-clib          0.2.8                    pypi_0    pypi
scipy                     1.13.0                   pypi_0    pypi
seaborn                   0.13.2                   pypi_0    pypi
setuptools                68.2.2          py311hca03da5_0  
six                       1.16.0                   pypi_0    pypi
sniffio                   1.3.1                    pypi_0    pypi
sqlite                    3.41.2               h80987f9_0  
swiglpk                   5.0.10                   pypi_0    pypi
sympy                     1.12                     pypi_0    pypi
tk                        8.6.12               hb8d0fd4_0  
toolz                     0.12.1                   pypi_0    pypi
tqdm                      4.66.2                   pypi_0    pypi
typing-extensions         4.11.0                   pypi_0    pypi
tzdata                    2024.1                   pypi_0    pypi
wheel                     0.41.2          py311hca03da5_0  
xarray                    2024.3.0                 pypi_0    pypi
xarray-einstats           0.7.0                    pypi_0    pypi
xz                        5.4.6                h80987f9_0  
zlib                      1.2.13               h5a0b063_0  
@augeorge
Copy link
Contributor Author

@djinnome @mcnaughtonadm any ideas?

@mcnaughtonadm
Copy link
Collaborator

This seems like a PyTensor issue, so it could be the version. My current build is at:

# packages in environment at /Users/mcna892/mambaforge/envs/emll_dev:
#
# Name                    Version                   Build  Channel
pytensor                  2.17.4                   pypi_0    pypi

which is able to run the scripts and tests in the package.

I will update to your version 2.20.0 and see if we need to enforce a lower version of PyTensor until we can update the code to reflect the newer versions.

@augeorge
Copy link
Contributor Author

it looks like the pytensor version was bumped for more recent pyMC versions. https://github.com/pymc-devs/pymc/releases

I will try pyMC version 5.9.11 which supports pytensor 2.17

@mcnaughtonadm
Copy link
Collaborator

I am able to replicate your error with the following versions of PyMC and PyTensor

# packages in environment at /Users/mcna892/mambaforge/envs/test_emll:
#
# Name                    Version                   Build  Channel
pymc                      5.13.1                   pypi_0    pypi
pytensor                  2.20.0                   pypi_0    pypi

We can use this issue to narrow down either a code-fix or set a constraint on the setup.cfg file to restrict PyTensor and PyMC to working versions.

@mcnaughtonadm mcnaughtonadm self-assigned this Apr 17, 2024
@mcnaughtonadm mcnaughtonadm added the bug Something isn't working label Apr 17, 2024
@augeorge
Copy link
Contributor Author

ok it now runs when I use

pymc                      5.9.2                    pypi_0    pypi
pytensor                  2.17.4                   pypi_0    pypi
python                    3.11.8               hb885b13_0  

@augeorge
Copy link
Contributor Author

augeorge commented Apr 17, 2024

if we fix pymc to version 5.9.2 in the setup file then it should fix the problem (for now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants