Re: Auto-weka problem

Michael Hall <[email protected]>
Newsgroups gmane.comp.ai.weka
Message-ID <[email protected]>

> On Jun 14, 2021, at 12:06 AM, justinuliu <[email protected]> wrote:
> 
> Michael Hall wrote
>>> On Jun 13, 2021, at 5:13 PM, justinuliu &lt;
> 
>> [email protected]
> 
>> &gt; wrote:
>>> 
>>> Hi,
>>> 
>>> Auto-weka will invoke java while running. So please make sure that you
>>> have
>>> installed JRE or JDK in your system and correctly set the PATH variable
>>> to
>>> include $JAVA_HOME/bin before using it. That is, if you cannot invoke
>>> java
>>> in command prompt, Auto-weka will not be able to invoke it either and
>>> fail.
>>> You can simply put bundled jre (weka-$VERSION/jre/zulu*/bin) in PATH
>>> variable if you don't want to install any other JAVA package.
>>> 
>>> Hope this helps.
>>> 
>>> Cheers,
>>> Justin
>> 
>> I think your solution only applies command line or on some specific
>> platform? On OS/X the jre for the Weka application is embedded and doesn’t
>> include a bin directory at all. You used to be able to just copy a
>> compatible one in for the ‘java’ command but I haven’t tried that for a
>> while. I did do it for Auto-Weka some time ago.
>> Currently I’ve been doing things, not Weka, with app’s created using the
>> jpackage command. Here it seems to depend on what jlink related parameters
>> you use. To get the java command I think you would just need —link-options
>> that omit —strip-native-commands. For other commands I think you need to
>> include the correct —add-modules.
>> I don’t believe Weka uses jpackage at this time. 
>> _______________________________________________
>> Wekalist mailing list -- 
> 
>> [email protected]
> 
>> Send posts to 
> 
>> [email protected]
> 
>> To unsubscribe send an email to 
> 
>> [email protected]
> 
>> To subscribe, unsubscribe, etc., visit
>> https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz <https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz>
>> List etiquette:
>> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html <http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html>
> 
> Hi,
> 
> Sorry for misleading you. In the previous message, I should say "take an
> example on Ubuntu". You're right, there is no bin folder in the WEKA
> application on OS/X, so we cannot simply let PATH variable include the
> embedded JRE.
> 
> I have observed this problem occnk idental thiurs both on Windows and Ubuntu even if I use
> GUI. When the problem occurs, again take an example on Ubuntu, I can see
> something like "mac-v2.10.03-master-778/smac: line 13: exec: java: not
> found" in the log file in /tmp/autowekaXXXXXXXXXXX/Auto-WEKA/out/logs. Then
> I assume that Auto-WEKA need to invoke java command while running. After I
> have installed java package and make sure I can call java in terminal, the
> problem disappeared. So I think smac may simply run a command call in
> somewhere. 
> 
> BTW, for the embedded jre on OS/X, I used to delete the Home folder in
> /Application/weka-3-8-5-azul-zulu.app/Contents/Plugins/zulu-11.jre/Content/
> and create a soft link to my current java home. It looks working well. 

I think on OS/X Weka uses appbundler to create the application. Including a runtime or not was optional with that tool. There used to be what was called, if I remember right, the ’shared’  JRE. So if you didn’t embed one it would just pick that up. Pointing to your own preferred JRE is a bit of a hack, but sure should work as well. I’m not sure solutions like that will always keep working though as OS releases keep adding more and more security restrictions for what apps can do externally. 
You could use jpackage to maybe get around this (java command not included command) as I mentioned in my last post. I think about all you need to include for Weka is weka.jar. Create your own application and include the commands you want. Hopefully Waikato has no concerns on this not being their official distribution. For your own use you’d probably be fine. I did this with GraalVM sometime back. I have thought Weka might be able to make some advantageous use of the FastR implementation for the R language that you can get with the GraalVM. Currently I think pushing data across the R/Java interfaces has limitations in what is normally used.
After the recent XGBoost question on this list I tried to install that with GraalVM FastR. After a couple issues the package could be installed but crashed on training. I commented on XGBoost sharing the install concerns issue and opened an issue on the crash.

_______________________________________________
Wekalist mailing list -- [email protected]
Send posts to [email protected]
To unsubscribe send an email to [email protected]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.