automl / autoweka

Auto-WEKA
http://www.cs.ubc.ca/labs/beta/Projects/autoweka/
330 stars 105 forks source link

Problem running Auto-WEKA #95

Open vishnukarna438 opened 3 years ago

vishnukarna438 commented 3 years ago

Hi, While running Auto WEKA I am getting this error message.

Java executable could not be found. Please refer to "known issues " in the Auto-WEKA manual.

Please help me to resolve this. FYI I am using WEKA version 3.9.5 in macOS Big Sur (11.5.1).

Thank you.

larskotthoff commented 3 years ago

Do you have java installed? What version, and how did you install it?

vishnukarna438 commented 3 years ago

I have downloaded and installed the following version of Java jre-8u301-macosx-x64 from https://java.com/en/download/

larskotthoff commented 3 years ago

If you type "java -version" in a terminal, what happens?

vishnukarna438 commented 3 years ago

It showing like this.

java version "1.8.0_301" Java(TM) SE Runtime Environment (build 1.8.0_301-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)

larskotthoff commented 3 years ago

Please don't post separate issues to the same thread.

@vishnukarna438 Are you running WEKA from the command line as the manual advises?

@simonprovost Have you tried with the latest release from Github?

vishnukarna438 commented 3 years ago

No. I am using application only. I don't know how to run WEKA from the command line. Please advice. Thank you.

larskotthoff commented 3 years ago

You need to open a terminal to type commands in. See the Auto-WEKA manual.

vishnukarna438 commented 3 years ago

When I run through the terminal, getting this error message.

karnavishnuvardhanareddy@KARNAs-MacBook-Pro ~ % cd /Applications/weka-3-9-5-oracle-jvm.app/Contents/Java/ java -jar weka.jar

cd: no such file or directory: /Applications/weka-3-9-5-oracle-jvm.app/Contents/Java/ Error: Unable to access jarfile weka.jar

When I open the weka-3-9-5 folder from applications there is no weka-3-9-5-oracle-jvm.app. see the screenshot of the folder attached. May be because of the wrong java path right. Do I need to install java in weka-3-9-5 folder!!!

Screenshot 2021-08-12 at 14 33 53
vishnukarna438 commented 3 years ago

I tried to change the path but still not getting.

karnavishnuvardhanareddy@KARNAs-MacBook-Pro ~ % cd /Applications/weka-3-9-5/weka.jar cd: not a directory: /Applications/weka-3-9-5/weka.jar karnavishnuvardhanareddy@KARNAs-MacBook-Pro ~ % cd /Applications/weka-3-9-5
karnavishnuvardhanareddy@KARNAs-MacBook-Pro weka-3-9-5 % cd weka.jar cd: not a directory: weka.jar karnavishnuvardhanareddy@KARNAs-MacBook-Pro weka-3-9-5 %

vishnukarna438 commented 3 years ago

Finally got by giving right path karnavishnuvardhanareddy@KARNAs-MacBook-Pro weka-3-9-5 % java -jar weka.jar

it opened the application. but while running showing the error

Screenshot 2021-08-12 at 14 50 26
larskotthoff commented 3 years ago

Hmm, when people had this problem in the past, it was usually a problem with the JDK. You could try installing a different version of the JDK.

vishnukarna438 commented 3 years ago

OK, I will try and let you know. Thank you.

simonprovost commented 3 years ago

@larskotthoff @vishnukarna438 I do, however, have the same issue. I have verified that with JDK version 16, nothing works, that with JDK version 15, the software runs but the error occurs, and that with JDK version 11, the same error occurs: "Problem evaluating classifier: null".

I am running weka via the command line with java -jar weka.jar; another option would be to do everything via the command line (including running auto-weka), but following the manual instructions, I am unable to locate auto-weka.jar after installing auto-weka via the package manager.

Any Suggestions/Ideas? Any JDK version to suggest?

Log:

[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - WARNING: An illegal reflective access operation has occurred
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (file:/Applications/weka-3-8-5-azul-zulu.app/Contents/Java/weka.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - WARNING: All illegal access operations will be denied in a future release
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:45.935 [main] WARN Experiment - WARNING: An illegal reflective access operation has occurred
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:45.936 [main] WARN Experiment - WARNING: Illegal reflective access by ca.ubc.cs.beta.aeatk.targetalgorithmevaluator.base.cli.CommandLineAlgorithmRun (file:/Users/simonprovost/wekafiles/packages/Auto-WEKA/smac-v2.10.03-master-778/lib/aeatk.jar) to field java.lang.ProcessImpl.pid
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:45.936 [main] WARN Experiment - WARNING: Please consider reporting this to the maintainers of ca.ubc.cs.beta.aeatk.targetalgorithmevaluator.base.cli.CommandLineAlgorithmRun
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:45.937 [main] WARN Experiment - WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:45.937 [main] WARN Experiment - WARNING: All illegal access operations will be denied in a future release
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:46.153 [main] WARN Experiment - [WARN ] [PROCESS-ERR] Exception in thread "main" java.lang.NoClassDefFoundError: weka/core/Instance
[Thread-12] ERROR weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:46.189 [main] ERROR Experiment - [ERROR] Message:  Wrapper did not output anything that matched the expected output ("Result of algorithm run:..."). Please try executing the wrapper directly
[Thread-12] ERROR weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:46.194 [main] ERROR Experiment - [ERROR] We tried to call the target algorithm wrapper, but this call failed.
[Thread-12] ERROR weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:46.195 [main] ERROR Experiment - [ERROR] The problem is (most likely) somewhere in the wrapper or with the arguments to SMAC.
[Thread-12] ERROR weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:46.195 [main] ERROR Experiment - [ERROR] The easiest way to debug this problem is to manually execute the call we tried and see why it did not return the correct result
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:46.280 [main] WARN SMACTrajectoryParser - Could not find runs_and_results file
[Thread-12] WARN weka.classifiers.meta.AutoWEKAClassifier - 2021-08-13 00:09:46.346 [main] WARN SMACTrajectoryParser - Could not find runs_and_results file
[Thread-12] INFO weka.classifiers.meta.AutoWEKAClassifier - Exception in thread "main" java.lang.RuntimeException: Failed to invoke child process
[Thread-12] INFO weka.classifiers.meta.AutoWEKAClassifier -     at autoweka.SubProcessWrapper.getErrorAndTime(SubProcessWrapper.java:234)
[Thread-12] INFO weka.classifiers.meta.AutoWEKAClassifier -     at autoweka.SubProcessWrapper.getErrorAndTime(SubProcessWrapper.java:147)
[Thread-12] INFO weka.classifiers.meta.AutoWEKAClassifier -     at autoweka.TrajectoryPointPredictionRunner.main(TrajectoryPointPredictionRunner.java:80)
[Thread-12] INFO weka.classifiers.meta.AutoWEKAClassifier -     at autoweka.tools.ExperimentRunner.main(ExperimentRunner.java:59)
[Thread-12] INFO weka.classifiers.meta.AutoWEKAClassifier - Caused by: java.lang.RuntimeException: Failed to find output line from subprocess wrapper
[Thread-12] INFO weka.classifiers.meta.AutoWEKAClassifier -     at autoweka.SubProcessWrapper.getErrorAndTime(SubProcessWrapper.java:226)
[Thread-12] INFO weka.classifiers.meta.AutoWEKAClassifier -     ... 3 more
[Thread-11] INFO autoweka.TrajectoryMerger - Experiment /var/folders/xd/hlwb4c2s2qd9rn1b3bgs_1g80000gn/T/autoweka9891351434382893496/Auto-WEKA
[Thread-11] INFO weka.classifiers.meta.AutoWEKAClassifier - Thread 0, best configuration estimate -1.0
[Thread-11] INFO weka.classifiers.meta.AutoWEKAClassifier - classifier: null, arguments: [], attribute search: null, attribute search arguments: [], attribute evaluation: null, attribute evaluation arguments: []
java.lang.NullPointerException
larskotthoff commented 3 years ago

Hmm, could be that the latest version of Mac OS is limiting the ability of processes to call other processes, i.e. java in this case. I can't test this myself unfortunately. If you have access to a computer running Linux or Windows, I would try that.

simonprovost commented 3 years ago

@larskotthoff Thanks for that, Will give it a shot with my google compute engine virtual machine runs (i.e.: Ubuntu v18 LTS) my ML stuff. However, could you provides us with the command line to run Auto-WEKA in CLI? Because I am unable to do the same as in the manual, can you ?

@vishnukarna438 if you are able to find anything let us know.

larskotthoff commented 3 years ago

The exact commandline depends on your WEKA installation and operating system. Unfortunately I don't have access to a Mac.

simonprovost commented 3 years ago

Lars, the following command line worked on my Ubuntu Linux virtual machine instance:

java -cp ../dest_to_auto_weka_version/autoweka.jar:/dest_to_weka_version/weka.jar weka.classifiers.meta.AutoWEKAClassifier  -t ./iris.arff -timeLimit 1 -no-cv                                                                                               

The problem is not yet solved on OSX but a rapid change to Ubuntu solved my issue of using Auto-WEKA. Thank you very much . @vishnukarna438 This comment can probably motivate you to switch onto a Google Compute Engine free instance with Ubuntu LTS 16/18 and go ahead make your experiments!

See you later guys, cheers.

larskotthoff commented 3 years ago

Thanks for the feedback!