Cannot run RapidMiner process from Python with Performance Operator

winn
winn New Altair Community Member
edited November 5 in Community Q&A
I am trying to run a RapidMiner process using a Python script. When I run the process ( Decision Tree Model) without Performance operator, I am able to successfully execute it via connector.run_process but when I add Performance operator, the Python script fails with the error: 

 raise ValueError("Cannot handle files with '" + str(extension) + "' extension.")

ValueError: Cannot handle files with '.ioo' extension. 

I am attaching my process rmp files without Performance operator and with performance operator.
I am executing following code in python:

<p>connector = rapidminer.Studio(rm_home, rm_stdout=None, override_python_binary=True)</p><p><span style="background-color: transparent; color: inherit; font-size: inherit; font-family: "open sans", sans-serif;">my_process = connector.run_process("//Local Repository/processes/MyProcess")</span><br></p>

Best Answers

  • hbajpai
    hbajpai New Altair Community Member
    Answer ✓
    Hey @winn,

    The error is because you are passing the performance .ioo output as an object to Python and it is unable to parse it. If you use Performance to Data operator, after your performance block to convert the output to an example set, the error can be resolved. This way the pandas will parse the example set as a dataframe.
  • hbajpai
    hbajpai New Altair Community Member
    Answer ✓
    @winnYou can check the metadata by hovering over the output port of the operator to have an idea.


Answers

  • hbajpai
    hbajpai New Altair Community Member
    Answer ✓
    Hey @winn,

    The error is because you are passing the performance .ioo output as an object to Python and it is unable to parse it. If you use Performance to Data operator, after your performance block to convert the output to an example set, the error can be resolved. This way the pandas will parse the example set as a dataframe.
  • winn
    winn New Altair Community Member
    Hey @hbajpai
    Thanks a lot, this resolved my issue. For the future, how can I check what is the output type from an operator? I couldn't find that performance operator returns .ioo output.
  • hbajpai
    hbajpai New Altair Community Member
    Answer ✓
    @winnYou can check the metadata by hovering over the output port of the operator to have an idea.