khiops.core.internals.common
Submodule of khiops.core.internals
Common utility functions and classes
| CLASS | DESCRIPTION |
|---|---|
SystemSettings |
Khiops system settings |
CommandLineOptions |
Khiops command line options |
| FUNCTION | DESCRIPTION |
|---|---|
type_error_message |
Formats a type error message |
invalid_keys_message |
Formats an invalid keyword parameter message |
deprecation_message |
Formats a deprecation message |
is_string_like |
Returns True if an object is a valid Python string or sequence of bytes |
is_list_like |
Returns True if an object is list-like |
is_dict_like |
Returns True if an object is dict-like |
is_iterable |
Return True if a container object is iterable, but not string-like |
Classes
SystemSettings(max_cores=None, memory_limit_mb=None, temp_dir='', scenario_prologue='')
Khiops system settings
Note
These settings are not available in the CommandLineOptions.
See class docstring
| METHOD | DESCRIPTION |
|---|---|
check |
Checks the types of the system settings |
Methods:
check()
Checks the types of the system settings
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If any of the system settings does not have the proper type. |
ValueError
|
If |
CommandLineOptions(log_file_path='', task_file_path='', output_scenario_path='')
Khiops command line options
| ATTRIBUTE | DESCRIPTION |
|---|---|
log_file_path |
Path of the log file for the Khiops process (command line option
TYPE:
|
output_scenario_path |
Path of the output Khiops scenario file (command line option
TYPE:
|
task_file_path |
Path of the task file for the Khiops process (command line option
TYPE:
|
See class docstring
| METHOD | DESCRIPTION |
|---|---|
check |
Checks the types of the command line options |
Methods:
check()
Checks the types of the command line options
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If any of the command line options does not have the proper type. |
Functions:
type_error_message(variable_name, variable, *target_types)
Formats a type error message
| PARAMETER | DESCRIPTION |
|---|---|
variable_name
|
Name of the variable for whom the type error is signaled.
TYPE:
|
variable
|
Actual variable for whom the type error is signaled.
TYPE:
|
target_types
|
Expected types for
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
The type error message. |
invalid_keys_message(kwargs)
Formats an invalid keyword parameter message
deprecation_message(deprecated_feature, deadline_version, replacement=None, quote=True)
Formats a deprecation message
is_string_like(test_object)
Returns True if an object is a valid Python string or sequence of bytes
is_list_like(list_like)
Returns True if an object is list-like
An object is list-like if and only if inherits from
collections.abc.Sequence
and it is not string-like <is_string_like>
is_dict_like(test_object)
Returns True if an object is dict-like
An object is dict-like if and only if inherits from the
collections.abc.Mapping.
is_iterable(test_object)
Return True if a container object is iterable, but not string-like