hobbit-project / platform

HOBBIT benchmarking platform
GNU General Public License v2.0
23 stars 9 forks source link

Reconfiguring a task does not show all parameters #63

Open MichaelRoeder opened 7 years ago

MichaelRoeder commented 7 years ago

Problem

When an already created challenge task is opened a second time to change its configuration, not all possible parameter values can be chosen. It seems like not all information, e.g., a list of possible datasets, is available to the UI. This should be fixed in the UI backend by requesting the benchmark model from the controller and merging it with the model that the UI received from the store.

Workaround

At the moment, another benchmark has to be chosen, the task has to be stored with this other benchmark. After that, the task can be edited again and the correct benchmark can be configured with all values available.

Ennosigaeon commented 7 years ago

In addition, when opening the task again, the dropdown is filled using the option value and not like for creating a new task the option labels.

Ennosigaeon commented 6 years ago

I had a look at the cause for this issue and I guess it is basically caused by the way we store a configured benchmark for a task. To demonstrate this problem, I'll use the GERBIL Benchmark - A2KB Benchmark. This benchmark has two configuration dropdowns and the corresponding (shortened) JSON looks like

{  
   "type":"benchmarkBean",
   "description":"A2KB benchmark based on GERBIL",
   "id":"http://w3id.org/gerbil/hobbit/vocab#GerbilBenchmarkA2KB",
   "name":"GERBIL Benchmark - A2KB",
   "configurationParamNames":[  
      "Type of experiment",
      "Dataset name"
   ],
   "configurationParams":[
      {  
         "description":"The dataset which should be tested.",
         "id":"http://w3id.org/gerbil/hobbit/vocab#hasDataset",
         "name":"Dataset name",
         "feature":true,
         "options":[  
            {  
               "label":"N3-Reuters-128",
               "value":"http://w3id.org/gerbil/vocab#N3-Collection-Reuters128"
            },
            {  
               "label":"OKE 2017 Task 2 training",
               "value":"http://w3id.org/gerbil/vocab#OKE2017-2-training"
            },
            {  
               "label":"DBpediaSpotlight",
               "value":"http://w3id.org/gerbil/vocab#DBpediaSpotlight"
            },
            {....}
         ],
         "range":"http://w3id.org/gerbil/vocab#Datasets",
         "required":false
      },
      {....}
   ]
}

This representation contains all different options for the dropdown and is displayed correctly (e.g. /benchmarks). However, as soon as specific values for a benchmark are selected (e.g. for a challenge task), the representation of the benchmark changes to

"benchmark":{  
    "description":"A2KB benchmark based on GERBIL",
    "id":"http://w3id.org/gerbil/hobbit/vocab#GerbilBenchmarkA2KB",
    "name":"GERBIL Benchmark - A2KB",
    "configurationParamNames":[  
       "Type of experiment",
       "Dataset name"
    ],
    "configurationParams":[  
       {  
          "description":"Defines the type of experiment that should be carried out.",
          "id":"http://w3id.org/gerbil/hobbit/vocab#hasExperimentType",
          "name":"Type of experiment",
          "defaultValue":"http://w3id.org/gerbil/vocab#OKE2015_Task1",
          "feature":true,
          "options":[  
             {  
                "label":"http://w3id.org/gerbil/vocab#A2KB",
                "value":"http://w3id.org/gerbil/vocab#A2KB"
             }
          ],
          "range":"http://w3id.org/gerbil/vocab#ExperimentTypes",
          "required":false
       },
       {  
          "description":"The dataset which should be tested.",
          "id":"http://w3id.org/gerbil/hobbit/vocab#hasDataset",
          "name":"Dataset name",
          "feature":true,
          "options":[  
             {  
                "label":"http://w3id.org/gerbil/vocab#DBpediaSpotlight",
                "value":"http://w3id.org/gerbil/vocab#DBpediaSpotlight"
             }
          ],
          "range":"http://w3id.org/gerbil/vocab#Datasets",
          "required":false
       }
    ],
    "systems":[  
    ]
 }

This JSON contains the previously selected values of the dropdowns but not all possible values. Furthermore, for label and value are set to the same string (leading to #72). I have tracked this problem through the Java Code upto the class RdfModelHelper which creates all DAOs from RabbitMq. This implies that the connection between the possible values (ConfigurationParamBean) and the actually selected value (ConfigurationParamValueBean) is not stored.

If we could add this connection in the backend, I can adapt the frontend accordingly. However, I do not think that it's sensible that I recreated the connection on the frontend side solely.

MichaelRoeder commented 6 years ago

You are right. The problem is not located in the GUI client but in the GUI serverbackend. If the user chooses a "new" benchmark or creates a new challenge task, the benchmark model is retrieved from the platform controller which has the complete knowledge about the benchmark. When opening an already existing challenge task, the current implementation relies only on the data that is stored in our storage. Since we are not storing all data, the generated bean (and thus the generated JSON) is incomplete.

From my point of view, the solution would be to retrieve the data from the storage as it is done now and merge it with the general benchmark model retrieved from the platform controller.