secml.settings

secml.settings.SECML_HOME_DIR = '/home/docs/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 = ['/home/docs/secml-data/secml.conf', '/home/docs/checkouts/readthedocs.org/user_builds/secml/envs/v0.15/lib/python3.7/site-packages/secml-0.15-py3.7.egg/secml/secml.conf']

Active secml.conf configuration files.

secml.settings.SECML_DS_DIR = '/home/docs/secml-data/datasets'

Main directory for storing datasets.

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

secml.settings.SECML_MODELS_DIR = '/home/docs/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 = '/home/docs/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 = '/home/docs/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 = '/home/docs/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.