File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
swan-pipeline/src/main/java/de/fraunhofer/iem/swan/cli Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 11package de .fraunhofer .iem .swan .cli ;
22
33import de .fraunhofer .iem .swan .SwanPipeline ;
4+ import de .fraunhofer .iem .swan .model .ModelEvaluator ;
45import org .slf4j .Logger ;
56import org .slf4j .LoggerFactory ;
67
@@ -43,11 +44,25 @@ public Integer run(SwanOptions options) throws Exception {
4344
4445 List <String > instances = new ArrayList <>();
4546
47+ String dataset = "" ;
48+
49+ switch (ModelEvaluator .Toolkit .valueOf (options .getToolkit ().toUpperCase ())) {
50+
51+ case MEKA :
52+ dataset = options .getToolkit ();
53+ break ;
54+ case WEKA :
55+ case MLPLAN :
56+ case AUTOWEKA :
57+ dataset = "weka" ;
58+ break ;
59+ }
60+
4661 for (String feature : options .getFeatureSet ()) {
47- String filepath = File .separator + "dataset" + File .separator + options .getToolkit () + File .separator + feature ;
62+ String filepath = File .separator + "dataset" + File .separator + dataset
63+ + File .separator + feature ;
4864
4965 ArrayList <String > files = new ArrayList <>();
50-
5166 for (File f : Objects .requireNonNull (fileUtility .getResourceDirectory (filepath ).listFiles ())) {
5267 files .add (f .getAbsolutePath ());
5368 }
@@ -56,7 +71,7 @@ public Integer run(SwanOptions options) throws Exception {
5671 options .setInstances (instances );
5772 }
5873
59- logger .info ("SWAN options: {}" , options );
74+ logger .info ("Configuring SWAN with {}" , options );
6075
6176 try {
6277 swanPipeline = new SwanPipeline (options );
You can’t perform that action at this time.
0 commit comments