C compiler error while running python module 'pymc'

Paulami
Paulami Registered Posts: 8 ✭✭✭

Hi,
I am using pymc module to develop a MMM model in Dataiku. While working on it, I am experiencing this somewhat well-known error on C compiler but couldn't find any solution on Dataiku yet.
Code where the error occured:
import warnings
import arviz as az
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pymc as pm
import seaborn as sns
import dataiku
from pymc_marketing.mmm import MMM, GeometricAdstock, LogisticSaturation,MichaelisMentenSaturation
from pymc_marketing.prior import Prior
mmm = MMM()
mmm.fit(X, y, nuts_sampler="numpyro", **sampler_kwargs)
Error:
error: ld returned 1 exit su can find the C code in this temporary file: /tmp/pytensor_compilation_error_eusqphwd

Traceback (most recent call last)<ipython-input-107-73aef3a45723> in <cell line: 1>()----> 1 idata = mmm.fit(X, y, nuts_sampler="numpyro", **sampler_kwargs)/datadir/dataiku/DATA_ATHENA/code-envs/python/MMM_TEST/lib/python3.10/site-packages/pymc_marketing/model_builder.py in fit(self, X, y, progressbar, predictor_names, random_seed, **kwargs) 533 534 if not hasattr(self, "model"):--> 535 self.build_model(self.X, self.y) 536 537 sampler_config = self.sampler_config.copy()/datadir/dataiku/DATA_ATHENA/code-envs/python/MMM_TEST/lib/python3.10/site-packages/pymc_marketing/mmm/delayed_saturated_mmm.py in build_model(self, X, y, **kwargs) 482 channel_contributions = pm.Deterministic( 483 name="channel_contributions",--> 484 var=self.forward_pass(x=channel_data_), 485 dims=("date", "channel"), 486 )/datadir/dataiku/DATA_ATHENA/code-envs/python/MMM_TEST/lib/python3.10/site-packages/pymc_marketing/mmm/delayed_saturated_mmm.py in forward_pass(self, x) 342 ) 343 --> 344 return second.apply(x=first.apply(x=x, dims="channel"), dims="channel") 345 346 def build_model(/datadir/dataiku/DATA_ATHENA/code-envs/python/MMM_TEST/lib/python3.10/site-packages/pymc_marketing/mmm/components/base.py in apply(self, x, dims) 511 """ 512 kwargs = self._create_distributions(dims=dims)--> 513 return self.function(x, **kwargs)/datadir/dataiku/DATA_ATHENA/code-envs/python/MMM_TEST/lib/python3.10/site-packages/pymc_marketing/mmm/components/adstock.py in function(self, x, alpha) 188 189 def function(self, x, alpha):--> 190 return geometric_adstock( 191 x, alpha=alpha, l_max=self.l_max, normalize=self.normalize, mode=self.mode 192 )/datadir/dataiku/DATA_ATHENA/code-envs/python/MMM_TEST/lib/python3.10/site-packages/pymc_marketing/mmm/transformers.py in geometric_adstock(x, alpha, l_max, normalize, axis, mode) 233 w = pt.power(pt.as_tensor(alpha)[..., None], pt.arange(l_max, dtype=x.dtype)) 234 w = w / pt.sum(w, axis=-1, keepdims=True) if normalize else w--> 235 return batched_convolution(x, w, axis=axis, mode=mode) 236 237 /datadir/dataiku/DATA_ATHENA/code-envs/python/MMM_TEST/lib/python3.10/site-packages/pymc_marketing/mmm/transformers.py in batched_convolution(x, w, axis, mode) 123 124 if l_max is None: # pragma: no cover--> 125 raise NotImplementedError( 126 "At the moment, convolving with weight arrays that don't have a concrete shape " 127 "at compile time is not supported."NotImplementedError: At the moment, convolving with weight arrays that don't have a concrete shape at compile time is not supported.

Version used for relevant packages:
pymc==5.15.1
arviz==0.18.0
matplotlib==3.6.2
numpy==1.23.5
pandas==1.5.2
jax==0.4.30
numpyro==0.15.1
ipywidgets==7.6.5
pymc-marketing==0.8.0
theano-pymc==1.1.2
pytensor<2.23, >=2.22.1
This is a similar discussion I can find on Google on the exact same error.
Pytensor compilation error - Questions / version agnostic - PyMC Discourse
Also Note: The same code with same package versions is running fine in my local Anaconda.

Best Answers

Setup Info
    Tags
      Help me…