utils
Arguments
Bases: object
Singleton implementation of the arguments as an immutable object
Source code in build/lib/model_ensembler/utils.py
background_fork(double=False)
Allows for the calling process to fork into the background.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
double
|
bool
|
If true, we'll fork again as to allow the parent of the first child to kill it, leaving the daemon process. |
False
|
Raises:
| Type | Description |
|---|---|
OSError
|
If fork fails. |
Source code in build/lib/model_ensembler/utils.py
setup_logging(name='', level=logging.INFO, verbose=False, logdir=os.path.join('logs'), logformat='[%(asctime)-20s :%(levelname)-8s] - %(message)s')
Sets up logging library for output with user friendly options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
string
|
A string indicating the name of the caller. |
''
|
level
|
int
|
|
INFO
|
verbose
|
bool
|
Shorthand for setting level to |
False
|
logdir
|
string
|
If logging to a file, allow directory destination. |
join('logs')
|
logformat
|
string
|
Allow specification of |
'[%(asctime)-20s :%(levelname)-8s] - %(message)s'
|