Context#

class Context[source]#

Contains all the data + properties the user has passed to a check/suite, and validates it seamlessly.

Parameters
trainOptional[VisionData] , default: None

VisionData object, representing data the model was fitted on

testOptional[VisionData] , default: None

VisionData object, representing data the models predicts on

random_stateint

A seed to set for pseudo-random functions

with_displaybool , default: True

flag that determines if checks will calculate display (redundant in some checks).

__init__(train: Optional[VisionData] = None, test: Optional[VisionData] = None, random_state: int = 42, with_display: bool = True)[source]#
__new__(*args, **kwargs)#

Attributes

Context.task_type

Return the common task type of the datasets.

Context.test

Return test if exists, otherwise raise error.

Context.train

Return train if exists, otherwise raise error.

Context.with_display

Return the with_display flag.

Methods

Context.assert_task_type(*expected_types)

Assert task_type matching given types.

Context.finalize_check_result(check_result, ...)

Run final processing on a check result which includes validation and conditions processing.

Context.get_data_by_kind(kind)

Return the relevant VisionData by given kind.

Context.have_test()

Return whether there is test dataset defined.