Dataiku compatibility with pystan

amith_yadav Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 2


We were trying to execute some stan code on dataiku using and was facing issues. So we wanted a confirmation on whether the pystan is compatible with Dataiku. If compatible, what version of pystan is compatible with Dataiku. Please share some code snippets if anyone has worked with pystan on Dataiku to create model instances.




  • Catalina
    Catalina Dataiker, Dataiku DSS Core Designer, Registered Posts: 135 Dataiker

    Hi @amith_yadav

    • Can you give more details about the issues that you are facing?
    • Are you getting any error messages?
    • Which pystan version did you install in the code env?

    As mentioned in the documentation the STAN package requires very recent C++ compilers that most Linux distributions do not provide, in particular the “C++14” features. The version of pystan that you can used is related to the OS you are using. The requirement for the latest version (2.19+) of PyStan is that your OS supports C++14.

    An example code that shows how to use PyStan 3 is here.

  • amith_yadav
    amith_yadav Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 2
    edited July 17

    Thanks for the response @CatalinaS
    . But the example code link to use PyStan 3 which you have shared is not opening up.

    We were getting the below error with PyStan 3. I have attached the screenshot as well. This is working fine with PyStan 2 but we have to get this done with PyStan 3 as well. Please let us know what could be the issue and how to resolve the error.

    Building: 28.2s, done.Messages from stanc:
      The parameter mu has no priors.
      The parameter tau has no priors.
    Error handling request
    Traceback (most recent call last):
      File "/data/dataiku/dss_data/code-envs/python/personal_aammi_py37/lib/python3.7/site-packages/aiohttp/", line 433, in _handle_request
        resp = await request_handler(request)
      File "/data/dataiku/dss_data/code-envs/python/personal_aammi_py37/lib/python3.7/site-packages/aiohttp/", line 504, in _handle
        resp = await handler(request)
      File "/data/dataiku/dss_data/code-envs/python/personal_aammi_py37/lib/python3.7/site-packages/httpstan/", line 253, in handle_show_params
        services_module = httpstan.models.import_services_extension_module(model_name)
      File "/data/dataiku/dss_data/code-envs/python/personal_aammi_py37/lib/python3.7/site-packages/httpstan/", line 90, in import_services_extension_module
        module: ModuleType = importlib.util.module_from_spec(spec)  # type: ignore
      File "<frozen importlib._bootstrap>", line 583, in module_from_spec
      File "<frozen importlib._bootstrap_external>", line 1043, in create_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    ImportError: /home/dssuser_aammi/.cache/httpstan/4.4.2/models/gqxgg3k4/ undefined symbol: _ZNSt18basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev

Setup Info
      Help me…