How to display Rapid Miner GUI when running a process from Java code

nadi
nadi New Altair Community Member
edited November 5 in Community Q&A
I tried using RapidMiner.setExecutionMode(ExecutionMode.UI) with no success. There is no documentation in the java doc help describing impact of setExecutionMode for different supported modes.


Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    I'm not quite sure what you want - do you want to disguise RapidMiner as part of your application, or do you simply want to launch RapidMiner? In the latter case you should have a look at RapidMinerGUI.main(String[] args).

    Regards,
    Marco
  • nadi
    nadi New Altair Community Member
    Ideally I would like to see RapidMiner in action while my code is running the process. The alternative is to start RapidMiner GUI and load the process file (rmp file). I tried RapidMinerGUI.main(cmdArg); and passed the rmp file path as cmd argument. Rapid Miner splash is displayed, however, it prompts a message "RapidMiner repository is not defined...".  After selecting the repository the splash screen reappears and it hangs forever.
    What cmd argument I have to pass to RapidMinerGUI.main and in what order?

    Thanks,
    Nadi
  • aborg
    aborg New Altair Community Member
    Hi Nadi,

      You might want to take a look at my "fork" of RapidMiner. It is as up-to-date as 5.3.5 (check out the refactored_ui branch).
      I had some problems using the embedded UI, so refactored a few things. (It works within KNIME, so I think it is possible to do embedding with this code base.)
    Cheers, gabor
  • nadi
    nadi New Altair Community Member
    What do you mean by "refactored a few things." I am not familiar KNIME either. Is there a workable solution using official release of Rapid- Minder?
    If you can specify what to "refactor" and how, using official release of Rapid- Minder, it would be nice.

    Thanks,
    Nadi
  • StaryVena
    StaryVena New Altair Community Member
    Hi Nadi,
    if you have runnig process, you can use process.getCurrentOperator() to get the operator that is currently being executed. That should be enough to monitor process. Or you can use some logging operator.

    Best,
    Václav
  • aborg
    aborg New Altair Community Member
    Hi Nadi,

    The way I refactored include the following (I can give you more details if you need next week):
    • support for using from eclipse (one of the bundles set a resource handler factory and RM also tries it, but only a single set is allowed)
    • I wanted to not have a separate window when RM is used, so refactored it to specify the UI state not bound to a window (JFrame), but a custom class.
    • The splash screen is not shown when started with embedded UI
    • Do not exit when the window of RM is closed (maybe this could be solved other ways too)
    I am not sure if all these could be solved better, or differently, I could not find a better solution. I would prefer using a plain RM too instead of my custom fork (and updating mine on each release).
    You do not have to be familiar with KNIME to understand the basic usage in embedded form, but the KNIME SDK is also quite easy to understand if you want.
    Cheers, gabor

    PS.: I think I'll skip 5.3.7 version for now, so till next release the version I have will be 5.3.5..