The operator class 'legacy:write_model' is unknown for versiion 71

juxeii
juxeii New Altair Community Member
edited November 2024 in Community Q&A
Hello,

I'm with my first steps in embedding RapidMiner to my JavaApplication.
My first process uses the "Model Write" operator, but this one seems deprecated as one can see in this XML line:
<operator activated="true" class="legacy:write_model" compatibility="7.0.001" expanded="true" height="68" name="Write Model" width="90" x="849" y="187">

The problem is that my application cannot find the operator class:
INFO: <em class="error">The operator class 'legacy:write_model' is unknown. Possibly you must install a plugin for operators of group 'legacy'.</em>
I've created a FAT jar with all dependencies, so rapidminer-extension-legacy-7.0.1-all.jar is also on the classpath.
What do I have to do in the code so that the plugin classloaders can find this operator?

PS: If "Model Write" operator is deprecated, what is the new alternative way of saving a model?

Thx,
Juergen

Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    extensions need to be located in a specified directory to be found. Being on the classpath is not enough. You can either move them to the USER_HOME/.RapidMiner/extensions folder, or you can call

    Plugin.addAdditionalExtensionDir(String directory);
    before you init() RapidMiner Studio. That way, your directory should also be scanned for the extension jar files.

    The legacy Read/Write model operators wrote to the disk. We rather want you to use the repositories provided by RapidMiner, so the way going forward is to use the "Store" and "Retrieve" operators.

    Regards,
    Marco
  • merto
    merto New Altair Community Member
    Hi Juergen,

    would you mind sharing how did you compile a fat jar file with gradle?