SlipGURU Dipartimento di Informatica e Scienze dell'Informazione Università Degli Studi di Genova

app Package

CmdLineApp Module

Provides skeleton implementation for basic command line application that uses KDVS API; the ‘experiment’ application is based on it.

class kdvs.fw.impl.app.CmdLineApp.CmdLineApp

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
prepareEnv()

Interprets command line arguments, reads specified configuration file, initializes specific logging mechanism, initializes default paths, and creates concrete ExecutionEnvironment instance.

appProlog()

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.

appEpilog()

Creates ending timestamp in root output location and finishes logging.

Profile Module

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.

kdvs.fw.impl.app.Profile.NULL_PROFILE = {}

Simplest ‘null’ application profile that contains no elements to be checked against.

kdvs.fw.impl.app.Profile.MA_GO_PROFILE = {'labels_file': {}, 'go_domain': '', 'subset_inner_selectors': {}, 'envops': {}, 'reporters': {}, 'subset_outer_selectors': {}, 'subset_hierarchy_components_map': {}, 'subset_orderers': {}, 'gedm_file': {}, 'subset_categorizers': {}, 'annotation_file': {}, 'statistical_techniques': {}, 'subset_hierarchy_categorizers_chain': ()}

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.

Table Of Contents