Skip to content

Configuration Core Concepts

giovanni-stilo edited this page Jan 27, 2024 · 32 revisions

Classes Involved in Dataset generation

Figure 1:A high-level overview of a configuration.

A Configuration is a JSON/JSONC file that defines the main components GRETEL must use, as depicted in the figure above. The components that must be used are declared through the following mandatory sections:

  • experiment
  • do-pairs
  • explainers
  • evaluation_metrics
  • store_paths

Note that sections reported above must be considered reserved keywords at the root level of the configuration; on the other hand, they can be reordered as per your preference.

Hereafter, a sketch of the configuration is reported for having a broad picture. Note that the datasets, oracles, and explainers objects are denoted by json { ... } for readability.

{  
    "experiment" : {
        "scope": "examples_configs",
        "parameters" : {}
    },
    "do-pairs": [
        {"dataset" : { ... }, "oracle": { ... }},
        {"dataset" : { ... }, "oracle": { ... }},
        {"dataset" : { ... }, "oracle": { ... }},
    ],
    "explainers": [
        { ... },
        { ... },
        { ... } 
    ],
    "evaluation_metrics": [
        {"name": "runtime", "parameters": {}},
        {"name": "graph_edit_distance", "parameters": {}},
        {"name": "oracle_calls", "parameters": {}},
        {"name": "correctness", "parameters": {}}
    ],
    "store_paths": [
        {"name": "dataset_store_path", "address": "./data/cache/datasets/"},        
        {"name": "oracle_store_path", "address": "./data/cache/oracles/"},
        {"name": "embedder_store_path", "address": "./data/cache/oracles/"},
        {"name": "explainer_store_path", "address": "./data/cache/explainers/"},        
        {"name": "log_store_path", "address": "./output/logs/"},
        {"name": "output_store_path", "address": "./output/results/"}
    ]
}

As is possible to notice, almost all the sections define a list of objects. Thus, hereafter we discuss the relationships that exist among them.

Clone this wiki locally