PythonでPystanを使用したいと考えております。
以前は普通にモデルのコンパイルができたのですが、急にコンパイルが出来なくなりました。
特にエラーは出ないのですが、一晩寝かせてもコンパイルが終わらず、大量の警告文が表示されます。
直近でPCを交換しDockerを立ち上げ直した際に何か不具合が生じたのではないかと考えております。
何か対処法があれば、ご教示いただきたいと考えております。
◆コード
import pystan model_code = 'parameters {real y;} model {y ~ normal(0,1);}' model = pystan.StanModel(model_code=model_code) # this will take a minute y = model.sampling(n_jobs=1).extract()['y'] y.mean() # should be close to 0
◆警告文
文字数制限ですべて記載が出来ず、一部抜粋しています。
INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_5944b02c79788fa0db5b3a93728ca2bf NOW. cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ In file included from /opt/conda/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822, from /opt/conda/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /opt/conda/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4, from /tmp/pystan_ovjmwxp2/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_178375118815310174.cpp:892: /opt/conda/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] #warning "Using deprecated NumPy API, disable it with " \ ^~~~~~~ In file included from /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat/prob/poisson_log_glm_log.hpp:5, from /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat.hpp:336, from /opt/conda/lib/python3.7/site-packages/pystan/stan/src/stan/io/dump.hpp:6, from /opt/conda/lib/python3.7/site-packages/pystan/py_var_context.hpp:12, from /tmp/pystan_ovjmwxp2/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_178375118815310174.cpp:898: /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp: In function ‘typename stan::return_type<T_x, T_alpha, T_beta>::type stan::math::poisson_log_glm_lpmf(const T_y&, const T_x&, const T_alpha&, const T_beta&)’: /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp:64:59: warning: typedef ‘T_alpha_val’ locally defined but not used [-Wunused-local-typedefs] typename partials_return_type<T_alpha>::type>::type T_alpha_val; ^~~~~~~~~~~ In file included from /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/Core:420, from /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/Dense:1, from /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat/meta/as_array_or_scalar.hpp:4, from /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat.hpp:9, from /opt/conda/lib/python3.7/site-packages/pystan/stan/src/stan/io/dump.hpp:6, from /opt/conda/lib/python3.7/site-packages/pystan/py_var_context.hpp:12, from /tmp/pystan_ovjmwxp2/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_178375118815310174.cpp:898: /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/src/Core/AssignEvaluator.h: In instantiation of ‘struct Eigen::internal::copy_using_evaluator_traits<Eigen::internal::evaluator<Eigen::Diagonal<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, false>, 0> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> > >, Eigen::internal::mul_assign_op<double, double> >’: /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/src/Core/AssignEvaluator.h:739:10: required from ‘void Eigen::internal::call_dense_assignment_loop(DstXprType&, const SrcXprType&, const Functor&) [with DstXprType = Eigen::Diagonal<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, false>, 0>; SrcXprType = Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> >; Functor = Eigen::internal::mul_assign_op<double, double>]’ /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/src/Core/SelfCwiseBinaryOp.h:21:28: required from ‘Derived& Eigen::DenseBase<Derived>::operator*=(const Scalar&) [with Derived = Eigen::Diagonal<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, false>, 0>; Eigen::DenseBase<Derived>::Scalar = double]’ /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/fun/cholesky_decompose.hpp:161:27: required from here /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/src/Core/AssignEvaluator.h:86:63: warning: enum constant in boolean context [-Wint-in-bool-context] MayLinearVectorize = bool(MightVectorize) && MayLinearize && DstHasDirectAccess ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/Core:420, from /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/Dense:1, from /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat/meta/as_array_or_scalar.hpp:4, from /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat.hpp:9, from /opt/conda/lib/python3.7/site-packages/pystan/stan/src/stan/io/dump.hpp:6, from /opt/conda/lib/python3.7/site-packages/pystan/py_var_context.hpp:12, from /tmp/pystan_ovjmwxp2/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_178375118815310174.cpp:898: /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/src/Core/AssignEvaluator.h: In instantiation of ‘struct Eigen::internal::copy_using_evaluator_traits<Eigen::internal::evaluator<Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1> > >, Eigen::internal::evaluator<Eigen::ArrayWrapper<const Eigen::Matrix<double, -1, -1> > >, Eigen::internal::div_assign_op<double, double> >’: /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/src/Core/AssignEvaluator.h:607:49: required from ‘class Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1> > >, Eigen::internal::evaluator<Eigen::ArrayWrapper<const Eigen::Matrix<double, -1, -1> > >, Eigen::internal::div_assign_op<double, double>, 0>’ /opt/conda/lib/python3.7/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3/Eigen/src/Core/AssignEvaluator.h:739:10: required from ‘void Eigen::internal::call_dense_assignment_loop(DstXprType&, const SrcXprType&, const Functor&) [with DstXprType = Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1> >; SrcXprType = Eigen::ArrayWrapper<const Eigen::Matrix<double
あなたの回答
tips
プレビュー