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

classmethod from_dict(dict_)[source]
static get_build_args()[source]
static get_default_function_pod_requirement_resources(requirement: str, with_gpu: bool = True)[source]

a dict containing the defaults resources (cpu, memory,

get_default_function_pod_resources(with_gpu_requests=False, with_gpu_limits=False)[source]
static get_hub_url()[source]
static get_parsed_igz_version()Optional[semver.VersionInfo][source]
static get_storage_auto_mount_params()[source]
static get_valid_function_priority_class_names()[source]
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

static is_pip_ca_configured()[source]
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.

static reload()[source]
static resolve_ui_url()[source]
property version
mlrun.config.read_env(env=None, prefix='MLRUN_')[source]

Read configuration from environment