mlrun.config¶
Configuration system.
Configuration can be in either a configuration file specified by MLRUN_CONFIG_FILE environment variable or by environment variables.
Environment variables are in the format “MLRUN_httpdb__port=8080”. This will be mapped to config.httpdb.port. Values should be in JSON format.
-
class
mlrun.config.
Config
(cfg=None)[source]¶ Bases:
object
-
property
dask_kfp_image
¶ See kfp_image property docstring for why we’re defining this property
-
property
dbpath
¶
-
static
decode_base64_config_and_load_to_object
(attribute_path: str, expected_type=<class 'dict'>)[source]¶ decodes and loads the config attribute to expected type :param attribute_path: the path in the default_config e.g preemptible_nodes.node_selector :param expected_type: the object type valid values are : dict, list etc… :return: the expected type instance
-
static
get_default_function_pod_requirement_resources
(requirement: str, with_gpu: bool = True)[source]¶ - Parameters
requirement – kubernetes requirement resource one of the following : requests, limits
with_gpu – whether to return requirement resources with nvidia.com/gpu field (e.g you cannot specify GPU requests without specifying GPU limits) https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/
- Returns
a dict containing the defaults resources (cpu, memory, nvidia.com/gpu)
-
property
iguazio_api_url
¶ we want to be able to run with old versions of the service who runs the API (which doesn’t configure this value) so we’re doing best effort to try and resolve it from other configurations TODO: Remove this hack when 0.6.x is old enough
-
property
kfp_image
¶ When this configuration is not set we want to set it to mlrun/mlrun, but we need to use the enrich_image method. The problem is that the mlrun.utils.helpers module is importing the config (this) module, so we must import the module inside this function (and not on initialization), and then calculate this property value here.
-
property
version
¶
-
property