ImportError: cannot import name 'model'

Hi,

I can’t seem to import the model module from hops. I get the following error-message:

ImportError: cannot import name ‘model’

I have tried different projects and with different configurations but with no luck.

Would you know how to solve it?

Thanks in advance.

Thanks for reporting!

Unfortunately I cannot reproduce your issue on Hopsworks version 1.2 together with hops version 1.2.0.4, as well as on current master.

Can you try the same in a newly created project?

For us to be able to reproduce your issue, can you provide some more information about your setup: which version of Hopsworks and the hops library you are using, is it a hopsworks.ai deployment or a manual installation? Which kernel are you using, e.g. Python or PySpark? How are you importing the module and did you install or import other libraries before?

Are you able to import other modules, e.g. from hops import experiment?

You can find the Hopsworks version in the Settings tab -> Versions inside a project. And the hops version in the Python settings among the installed libraries in your project.

Thanks for the additional information.

Hi again, thanks for the quick reply.

I have tried it in two different projects, and now also just tried it in a brand new project, with no success.

I am using Hopsworks 1.0.0 and hops 1.0.0.4, and yes, I am able to import all the others modules (i.e. from hops import experiment works perfectly fine). I am also using the PySpark kernel.

I assume it is a hopsworks.ai deployment, since I haven’t downloaded anything manually, and run it all through my browser/the hopsworks api.

I am thankful for any help!

The model module was added in 1.1. Any chance you can use the latest release?

1 Like