Common

class InnerEye.ML.common.ModelExecutionMode(value)[source]

Model execution mode

TEST = 'Test'
TRAIN = 'Train'
VAL = 'Val'
class InnerEye.ML.common.OneHotEncoderBase[source]

Abstract class for a one hot encoder object

abstract encode(x: Dict[str, List[str]]) Any[source]

Encode dict mapping features to values and returns encoded vector.

abstract get_feature_length(column: str) int[source]

Gets the expected feature lengths for one hot encoded features using this encoder

abstract get_supported_dataset_column_names() List[str][source]

Gets the names of the columns that this encoder supports

InnerEye.ML.common.create_unique_timestamp_id() str[source]

Creates a unique string using the current time in UTC, up to seconds precision, with characters that are suitable for use in filenames. For example, on 31 Dec 2019 at 11:59:59pm UTC, the result would be 2019-12-31T235959Z.

InnerEye.ML.common.get_best_checkpoint_path(path: Path) Path[source]

Given a path and checkpoint, formats a path based on the checkpoint file name format.

:param path to checkpoint folder