Error while using ML-assisted Labeling > Query sampler

Herve
Herve Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 58 Partner
edited July 16 in Academy Discussions

Trying https://academy.dataiku.com/active-learning-plugin/505406

I get the following error when creating the Query sampler recipe

External code failed

Failed to start python worker : <class 'ModuleNotFoundError'> : No module named 'PIL'

Traceback (most recent call last):  File "/home/hblanc/dataiku-dss-9.0.0/python/dataiku/customui/server.py", line 29, in serve    python2_friendly_exec(code, ctx, ctx)  File "/home/hblanc/dataiku-dss-9.0.0/python/dataiku/customui/server.py", line 13, in python2_friendly_exec    exec(code, ctx_global, ctx_local)  File "<string>", line 5, in <module>ModuleNotFoundError: No module named 'PIL'

Best Answer

  • HenriC
    HenriC Dataiker Posts: 22 Dataiker
    Answer ✓

    Hello Herve!

    When going to the plugin settings in the section Code Environment, can you check the name of the code env used by the plugin? Once it is done, can you check your code envs under Administration > Code Envs > your_code_env, and check on the "Installed packages" Tab that you have the following package present:

    Pillow==5.1.0

    If not, have you tried creating a new code env?

Answers

  • Herve
    Herve Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 58 Partner

    I checked both the projet end the plugin are using PYTHON3.6 although I could not figure out if / how they should/can share the same environment.

    It seems each and everyone plugin has its own environment.

  • Herve
    Herve Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 58 Partner

    BTW I am using DSS 9.0

  • Herve
    Herve Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 58 Partner

    From the plugin log, Pillow is there :

    ******************************************************************************************************************** list packages** <AC:user:admin> at 2021/04/09 11:29:01.404** command : /home/hblanc/DATA_DIR/code-envs/python/plugin_ml-assisted-labeling_managed/bin/python -m pip freeze -l*******************************************************************************************************************
    absl-py==0.12.0
    astor==0.8.1
    certifi==2020.12.5
    chardet==3.0.4
    click==7.1.2
    Cython==0.29.22
    emoji==0.6.0
    Flask==0.12.5
    gast==0.2.2
    google-pasta==0.2.0
    grpcio==1.37.0
    h5py==2.7.1
    idna==2.8
    importlib-metadata==3.10.0
    itsdangerous==1.1.0
    Jinja2==2.10.3
    Keras==2.1.5
    Keras-Applications==1.0.8
    Keras-Preprocessing==1.1.2
    keras-resnet==0.1.0
    keras-retinanet==0.5.1
    Markdown==3.3.4
    MarkupSafe==1.1.1
    numpy==1.19.5
    opencv-python==4.5.1.48
    opt-einsum==3.3.0
    pandas==0.23.4
    patsy==0.5.1
    Pillow==5.1.0
    progressbar2==3.53.1
    protobuf==3.15.7
    python-dateutil==2.8.1
    python-utils==2.5.6
    pytz==2020.5
    PyYAML==5.4.1
    requests==2.22.0
    scikit-learn==0.20.4
    scipy==1.1.0
    six==1.15.0
    statsmodels==0.8.0
    tensorboard==1.15.0
    tensorflow==1.15.0
    tensorflow-estimator==1.15.1
    termcolor==1.1.0
    typing-extensions==3.7.4.3
    urllib3==1.25.11
    Werkzeug==0.16.1
    wrapt==1.12.1
    zipp==3.4.1

  • Herve
    Herve Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 58 Partner

    Now trying to build a new env for the ML Assisted Labelling plugin

  • Herve
    Herve Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 58 Partner

    Re-creating the cove env for the pluging worked

    Thanks @HenriC

Setup Info
    Tags
      Help me…