Can you elaborate?
Exception: ('Compilation failed (return status=1)... error after installing PyMC3 for the first time
well, on pyMC4 without providing idata_kwargs={"log_likelihood":True}
, pm.sampling_jax.sample_numpyro_nuts
would provide log_likehood
. However, with pyMC version 5, without kwargs InferenceData
would not include log_likelihood. I thought the default is log_likelihood = True
so the code above would be rewritten as;
with model.backend.model:
idata=pm.sampling_jax.sample_numpyro_nuts(draws= 2500, tune = 100, target_accept = .99, postprocessing_backend = 'cpu', idata_kwargs = {"log_likelihood": True)
posterior_predictive = pm.sample_posterior_predictive(trace = idata, extend_inferencedata=True)
This behavior changed with 5.0. See the release notes here.
1 Like
export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
Above code part worked for me. I was also receiving the following error
GCC_compiler.compile_str(dirname, code, location=loc, preargs=args)
File "/opt/homebrew/Caskroom/miniforge/base/envs/pymc_env_research/lib/python3.11/site-packages/pytensor/link/c/cmodule.py", line 2640, in compile_str
raise CompileError(
pytensor.link.c.exceptions.CompileError: Compilation failed (return status=1):
/opt/homebrew/Caskroom/miniforge/base/envs/pymc_env_research/bin/clang++ -dynamiclib -g -Wno-c++11-narrowing -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -fPIC -undefined dynamic_lookup -I/opt/homebrew/Caskroom/miniforge/base/envs/pymc_env_research/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniforge/base/envs/pymc_env_research/include/python3.11 -I/opt/homebrew/Caskroom/miniforge/base/envs/pymc_env_research/lib/python3.11/site-packages/pytensor/link/c/c_code -L/opt/homebrew/Caskroom/miniforge/base/envs/pymc_env_research/lib -fvisibility=hidden -o /Users/mehmet/.pytensor/compiledir_macOS-14.2.1-arm64-arm-64bit-arm-3.11.7-64/lazylinker_ext/lazylinker_ext.so /Users/mehmet/.pytensor/compiledir_macOS-14.2.1-arm64-arm-64bit-arm-3.11.7-64/lazylinker_ext/mod.cpp
ld: library 'System' not found
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)