automlbenchmark icon indicating copy to clipboard operation
automlbenchmark copied to clipboard

[AutoWEKA] Error: Could not find or load main class weka.classifiers.meta.AutoWEKAClassifier

Open learsi1911 opened this issue 4 years ago • 6 comments

Hi, I am trying to run some experiments in AutoWEKA but I got the above error. I think the problem is that weka.jar is no longer included in the autoweka archive. From my setup.sh I haven't changed anything, I'm using a "stable" version and WEKA is downloaded from: https://prdownloads.sourceforge.net/weka/weka-3-8-5-azul-zulu-linux.zip

learsi1911 avatar Dec 13 '21 10:12 learsi1911

Can you provide the exact command and the branch you used (or commit hash, if not using the head)?

PGijsbers avatar Dec 14 '21 10:12 PGijsbers

Yes, this is the command I used: python runbenchmark.py AutoWEKA openml/t/2073 pygmo_c -s force pygmo_c is a constrain with 5 folds and 1 hour time budget The branch is master

learsi1911 avatar Dec 14 '21 12:12 learsi1911

Hi,

I have the same problem, when running autoweka, it gives this error. CalledProcessError: Command 'java -cp /home/cynthia/automlmaster/project-automl/automlbenchmark/frameworks/AutoWEKA/lib/autoweka/autoweka.jar weka.classifiers .meta.AutoWEKAClassifier -t "/home/cynthi…, did anyone manage to solve?

cynthiamaia avatar Mar 29 '22 20:03 cynthiamaia

Can you describe to me the steps to reproduce this problem? And produce the full installation log when trying to install AutoWEKA? I installed from scratch and could not reproduce the error, specifically I performed the following steps and it worked correctly:

git clone https://github.com/openml/automlbenchmark.git
cd automlbenchmark
python -m venv venv
source venv/bin/activate
python -m pip install -r requirements.txt
python runbenchmark.py autoweka -t iris -f 0 -m docker -s force

It successfully installed AutoWEKA and its dependency (a pr last summer was supposed to fix this, is it possible you are using old code?).

PGijsbers avatar Mar 31 '22 08:03 PGijsbers

Indeed, autoweka work with iris, example, but when trying with my own dataset, all setup is done fine but it eventually fails during execution with:

...
**** AutoWEKA [vlatest]****

Using 37406MB memory per run on 4 parallel runs.
Running cmd `java -cp /bench/frameworks/AutoWEKA/lib/autoweka/autoweka.jar:/bench/frameworks/AutoWEKA/lib/weka/weka.jar weka.classifiers.meta.AutoWEKAClassifier -t "/input/test_data/differentiate_cancer_train.csv" -T "/input/test_data/differentiate_cancer_test.csv" -memLimit 37406 -classifications "weka.classifiers.evaluation.output.prediction.CSV -distribution -file \"/output/predictions/teddata/0/predictions.weka_pred.csv\"" -timeLimit 6 -parallelRuns 4 -metric areaUnderROC -seed 24977`
2022-09-21 09:08:03.676 [Thread-4] WARN AutoWEKAClassifier - 2022-09-21 09:08:03.676 [main] WARN Experiment - [WARN ] [PROCESS-ERR]  2022-09-21 09:08:03.643 [main] ERROR Wrapper - java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Vector
2022-09-21 09:08:03.676 [Thread-4] WARN AutoWEKAClassifier - 2022-09-21 09:08:03.676 [main] WARN Experiment - [WARN ] [PROCESS-ERR]  java.lang.RuntimeException: java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Vector
2022-09-21 09:08:03.677 [Thread-4] WARN AutoWEKAClassifier - 2022-09-21 09:08:03.676 [main] WARN Experiment - [WARN ] [PROCESS-ERR]     at autoweka.WorkerThread.run(WorkerThread.java:34)
2022-09-21 09:08:03.677 [Thread-4] WARN AutoWEKAClassifier - 2022-09-21 09:08:03.677 [main] WARN Experiment - [WARN ] [PROCESS-ERR]  Caused by: java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Vector
2022-09-21 09:08:03.677 [Thread-4] WARN AutoWEKAClassifier - 2022-09-21 09:08:03.677 [main] WARN Experiment - [WARN ] [PROCESS-ERR]     at java.lang.Class.forName0(Native Method)
...

However, given my recent experience with other frameworks I suspect it suffers from the same issue I reported in #498, i.e., my input data is in CSV when it should be ARFF.

alanwilter avatar Sep 21 '22 10:09 alanwilter

Good news, with help of https://github.com/anaavila/convert-csv-to-arff and tweaking my target to @attribute 'target' {0,1} in my new ARFF file and now AutoWeka worked fine for my dataset.

I would close this ticket. But as a suggestion, please add some info about ARFF and the input data in the README, FAQ etc. There's not a single world about it. I'm gonna test now the other frameworks that I'm sure need ARFF just to confirm my suspicions.

alanwilter avatar Sep 21 '22 11:09 alanwilter