secml.settings

secml.settings.SECML_HOME_DIR = '/builds/secml/secml/secml-data'

Main directory for storing datasets, experiments, temporary files.

This is set by default to:
  • Unix -> ${HOME}/secml-data

  • Windows -> (${HOME}, ${USERPROFILE}, ${HOMEPATH}, ${HOMEDRIVE})/secml-data

secml.settings.SECML_CONFIG = ['/builds/secml/secml/secml-data/secml.conf', '/builds/secml/secml/.tox/docs/lib/python3.5/site-packages/secml/secml.conf']

Active secml.conf configuration files.

secml.settings.SECML_DS_DIR = '/builds/secml/secml/secml-data/datasets'

Main directory for storing datasets.

This is set by default to: {SECML_HOME_DIR}/datasets

secml.settings.SECML_MODELS_DIR = '/builds/secml/secml/secml-data/models'

Main directory where pre-trained models are stored.

This is set by default to: {SECML_HOME_DIR}/models

secml.settings.SECML_EXP_DIR = '/builds/secml/secml/secml-data/experiments'

Main directory of experiments data.

This is set by default to: {SECML_HOME_DIR}/experiments

secml.settings.SECML_STORE_LOGS = False

Whether to store logs to file. Default False.

secml.settings.SECML_LOGS_DIR = '/builds/secml/secml/secml-data/logs'

Directory where logs will be stored.

This is set by default to: {SECML_HOME_DIR}/logs

secml.settings.SECML_LOGS_FILENAME = 'logs.log'

Name of the logs file on disk. Default: logs.log.

secml.settings.SECML_LOGS_PATH = '/builds/secml/secml/secml-data/logs/logs.log'

Full path to the logs file: {SECML_LOGS_DIR}/{SECML_LOGS_FILENAME}.

secml.settings.SECML_PYTORCH_USE_CUDA = True

Controls if CUDA should be used by the PyTorch wrapper when available.

secml.settings.parse_config(conf_files, section, parameter, default=None, dtype=None)[source]

Parse input parameter under section from configuration files.

Parameters file must have the following structure:

[section1]
param1=xxx
param2=xxx

[section2]
param1=xxx
param2=xxx
Parameters
conf_fileslist

List with the paths of the configuration files to parse.

sectionstr

Section under which look for specified parameter.

parameterstr

Name of the parameter. This is not case-sensitive.

defaultany, optional

Set default value of parameter. If None (default), parameter is considered required and so must be defined in the input configuration file. If not None, the value will be used if configuration file does not exists, section is not defined, or the parameter is not defined under section.

dtypetype or None, optional

Expected dtype of the parameter. If None (default), parameter will be parsed as a string. Other accepted values are: float, int, bool, str.