The specified Code Environment is not used when running tests for Python Function API Endpoint

Wolfram36
Wolfram36 Registered Posts: 4

I have setup a Conda environment which I am successfully using for two Webapps and some recipes.

However, when trying to create a Python Function API Endpoint, and using the "RUN TEST QUERIES" function, I get errors such as "ModuleNotFoundError: No module named 'transformers'" indicating that the prepared Code Environment is not used. Also, when observing the list of virtual environments in Anaconda, I can see that new VMs are created every time I run test queries, with the general name "env" and not using the dedicated "api_p38_env". The environments called "env" have completely different packages than the environment I have prepared.

I have specified theCode Environment settings as can be seen in the attached screenshot.

Also, I tried using two different Code Environments, so that the one used for the two Webapps is separate, but to no avail. 

The log file for the test, including errors, has been attached. I would appreciate any help.

I noticed that my issue looks similar to this one: https://community.dataiku.com/t5/Using-Dataiku/Use-file-from-code-env-resources-directory-with-API-Test-queries/m-p/31771/highlight/true#M11785

setting.png

code_env.png


Operating system used: MacOS 13.3.1 (a), Arm64


Operating system used: MacOS 13.3.1 (a), Arm64

Tagged:

Best Answer

Answers

Setup Info
    Tags
      Help me…