tarexp.component.base module#

class tarexp.component.base.Component[source]#

Bases: Savable

begin(*args, **kwargs)[source]#
reset(*args, **kwargs)[source]#
checkRole(role)[source]#
property hasStoppingRule#
property hasRanker#
property hasLabeler#
property hasSampler#
class tarexp.component.base.FunctionComponent(method, func, **kwargs)[source]#

Bases: Component

tarexp.component.base.asComponent(method)[source]#
class tarexp.component.base.CombinedComponent(comps: List[Component], strict: bool = True)[source]#

Bases: Component

begin(*args, **kwargs)[source]#
reset(*args, **kwargs)[source]#
save(output_file: Path)[source]#

Saving the object

Parameters:
  • path – Path to the output directory or filename. If a directory is provided, the filename is set to be the name of the class with extention .pgz.

  • overwrite – Whether to overwrite an existing file.

Return type:

The path to the saved file.

classmethod load(path: Path)[source]#

Class method for loading the saved file.

The method should be used as {Class}.load(filename) which loads the saved content as a {Class} instance with type checking.

Parameters:

path – Path to the output directory or filename. If a directory is provided, it looks for a name of the class with extention .pgz.

Return type:

An instance of the evoked class.

tarexp.component.base.combine(*comps)[source]#