Custom python model import error

Solved!
Vittaldev
Level 1
Custom python model import error

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

1 Solution
tgb417

@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.

--Tom

View solution in original post

0 Kudos
1 Reply
tgb417

@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.

--Tom
0 Kudos