Options

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

nadinadi Member Posts: 4 Contributor I
edited September 2019 in Help
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.


Tagged:

Answers

  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,995 RM Engineering
    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
  • Options
    nadinadi Member Posts: 4 Contributor I
    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
  • Options
    aborgaborg Member Posts: 66 Contributor II
    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
  • Options
    nadinadi Member Posts: 4 Contributor I
    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
  • Options
    StaryVenaStaryVena Member Posts: 126 Contributor II
    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
  • Options
    aborgaborg Member Posts: 66 Contributor II
    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..
Sign In or Register to comment.