Custom python model import error

Vittaldev
Vittaldev Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 2 Partner

I created a custom python module in libraries section. But when i import in a normal jupyter notebook it works fine. But when i import in python recipe it gives me module not found error

Best Answer

  • tgb417
    tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,598 Neuron
    Answer ✓

    @Vittaldev
    ,

    Welcome to the Dataiku Community.

    I'm not clear I have a solution for you. However, I may have an indication of what is causing the problems.

    In reading your note, I'm wondering what pythons code environment each of your attempts to run your model are using.

    There is a Base Code environment for Dataiku DSS, I believe that is where the Visual ML recipes run. I also believe that there is a recommendation not to alter that environment. However under choose a different on for your instance.

    Global Code Env Settings.jpg

    In setting for each project you can set a code environment.

    Choosing Project Default Code Environment.jpg

    Every Jupyter Notebook has a code environment.

    Every Python Recipie has a code environment. This is not the same as the Jupyter Notebook Code environmnet.

    Python Recipe Code Environmnt.jpg

    My best guess is that this environment is set to the default use DSS Base Code environment. And that you need to update this setting to get things working.

    Hope this helps. Please let us know how you are getting on with your project. And welcome to the community.

Setup Info
    Tags
      Help me…