super_gradients.common.environment package

Submodules

super_gradients.common.environment.env_helpers module

class super_gradients.common.environment.env_helpers.ColouredTextFormatter[source]

Bases: object

static print_coloured_text(text: str, colour: str)[source]

Prints a text with colour ascii characters.

class super_gradients.common.environment.env_helpers.TerminalColours[source]

Bases: object

Usage: https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-python?page=1&tab=votes#tab-top

BOLD = '\x1b[1m'
ENDC = '\x1b[0m'
FAIL = '\x1b[91m'
HEADER = '\x1b[95m'
OKBLUE = '\x1b[94m'
OKCYAN = '\x1b[96m'
OKGREEN = '\x1b[92m'
UNDERLINE = '\x1b[4m'
WARNING = '\x1b[93m'
super_gradients.common.environment.env_helpers.get_environ_as_type(environment_variable_name: str, default=None, cast_to_type: type = <class 'str'>)object[source]

Tries to get an environment variable and cast it into a requested type. :return: cast_to_type object, or None if failed. :raises ValueError: If the value could not be casted into type ‘cast_to_type’

super_gradients.common.environment.env_helpers.init_trainer()[source]

a function to initialize the super_gradients environment. This function should be the first thing to be called by any code running super_gradients. It resolves conflicts between the different tools, packages and environments used and prepares the super_gradients environment.

super_gradients.common.environment.env_helpers.is_distributed()bool[source]

super_gradients.common.environment.environment_config module

Module contents

This module is in charge of environment variables and consts.