Apply Pytorch Model in Rapidminer

Enes_A
Enes_A New Altair Community Member
edited November 5 in Community Q&A
Hey guys, 

I implemented a Pytorch Model and trained it and now i want to apply this model in Rapidminer. Is this possible?
When i retrieve the model and try to apply it with the "Apply Model"-Operator I get the following error message:

"Your connection is producing the wrong type of data. Try changing the starting point of the connection."

When I look at the logs, this is the error message:
Aug 8, 2021 12:06:37 PM SEVERE: Process failed: Wrong input of type 'File' at port 'model'. Expected type 'Model'. 

How would I do this? Is there something wrong with the model?

Best regards,

Enes

Tagged:

Best Answer

  • rfuentealba
    rfuentealba New Altair Community Member
    Answer ✓
    Hello,

    Pytorch models are created from Python, therefore you'll need the Python extension for RapidMiner, rather than using the "Apply Model" operator (that is created for RapidMiner models).

    With the Python extension you have an operator named "Execute Python" that you can use to actually write Python code that applies your model. Your Python interpreter needs pandas to read information from RapidMiner and write to it, and all the libraries you need for your model.

    All the best,

    Rod.

Answers

  • rfuentealba
    rfuentealba New Altair Community Member
    Answer ✓
    Hello,

    Pytorch models are created from Python, therefore you'll need the Python extension for RapidMiner, rather than using the "Apply Model" operator (that is created for RapidMiner models).

    With the Python extension you have an operator named "Execute Python" that you can use to actually write Python code that applies your model. Your Python interpreter needs pandas to read information from RapidMiner and write to it, and all the libraries you need for your model.

    All the best,

    Rod.