Provides skeleton implementation for basic command line application that uses KDVS API; the ‘experiment’ application is based on it.
Bases: kdvs.fw.App.App
Simple implementation of KDVS application that is configured from command line arguments. The functionality is tailored for ‘experiment’ application, which means the arguments are currently hard–coded:
Usage: experiment.py [options]
Knowledge Driven Variable Selection Experiment Application
Options:
-h, --help show this help message and exit
-c CFGFILE, --config-file=CFGFILE
read configuration from CFGFILE
-s SDDIR, --src-data-dir=SDDIR
read data files from SDDIR
-o OUTDIR, --output-dir=OUTDIR
store all results in OUTDIR
-l LOGFILE, --log-file=LOGFILE
direct log output to LOGFILE
--ignore-default-config
ignore default configuration (advanced)
--log-to-stdout log output to stdout
--use-debug-output write (lots of) detailed debug output
--log-level=LOG_LEVEL
set log level to specified
Interprets command line arguments, reads specified configuration file, initializes specific logging mechanism, initializes default paths, and creates concrete ExecutionEnvironment instance.
Creates physical root output location and debug output location, creates starting timestamp inside the output location, serializes initial configuration for debug purposes, creates an instance of DBManager, and verifies that the experiment profile specified in configuration file is correct.
Creates ending timestamp in root output location and finishes logging.
Provides functionality regarding handling application profiles. Also, provides pre–defined concrete profiles. Specific profile is read by application from configuration file. Application checks if the profile is complete, that is, if it contains all listed sections, and if section content is wrapped in correct data structure.
Simplest ‘null’ application profile that contains no elements to be checked against.
Application profile used by ‘experiment’ application. It is organized as a dictionary
- {section_name : section_prototype}
where ‘section_prototype’ refers to the example instance of the type that contains section content. For instance, when ‘section_prototype’ is an empty dictionary, it will be checked during profile validation that the content of the section is wrapped in a dictionary. Some sections may use different containers, like iterables, if necessary. See content of ‘example_experiment_cfg.py’ in example_experiment directory for an example of how this particular profile may be specified.