qrunch.common.environment

Module for listing qrunch environment variables.

Module Attributes

QRUNCH_NO_GUARD

Environment variable for turning off import guards and public api type guards.

QRUNCH_FORCE_CPU

Environment variable for forcing CPU-only execution, even if a GPU is available.

QRUNCH_LOG_LEVEL

Environment variable for setting the qrunch log level.

Functions

qrunch_check_env_is_enabled(env_variable)

Qrunch boolean value of environment variable.

qrunch_force_cpu()

Check if the QRUNCH_FORCE_CPU_ONLY environment variable is set to a truthy value.

qrunch_log_level()

Return the log level set by the QRUNCH_LOG_LEVEL environment variable, defaulting to WARNING.

qrunch_no_guard()

Check if the QRUNCH_NO_GUARD environment variable is set to a truthy value.

QRUNCH_FORCE_CPU = 'QRUNCH_FORCE_CPU_ONLY'

Environment variable for forcing CPU-only execution, even if a GPU is available.

QRUNCH_LOG_LEVEL = 'QRUNCH_LOG_LEVEL'

Environment variable for setting the qrunch log level.

Options: DEBUG, INFO, ESSENTIAL, WARNING, ERROR, CRITICAL.

QRUNCH_NO_GUARD = 'QRUNCH_NO_GUARD'

Environment variable for turning off import guards and public api type guards.

qrunch_check_env_is_enabled(env_variable: str) → bool

Qrunch boolean value of environment variable.

Parameters:

env_variable (str)

Return type:

bool

qrunch_force_cpu() → bool

Check if the QRUNCH_FORCE_CPU_ONLY environment variable is set to a truthy value.

Return type:

bool

qrunch_log_level() → int

Return the log level set by the QRUNCH_LOG_LEVEL environment variable, defaulting to WARNING.

Return type:

int

qrunch_no_guard() → bool

Check if the QRUNCH_NO_GUARD environment variable is set to a truthy value.

Return type:

bool