sampo.utilities.task_name#

Overview#

Classes#

NameMapper

Helper class that provides a standard way to create an ABC using

DummyNameMapper

Helper class that provides a standard way to create an ABC using

DictNameMapper

Helper class that provides a standard way to create an ABC using

ModelNameMapper

NameMapper for Kovalchuk’s model integration

Function#

get_task_name_unique_mapping(path)

Gets mapping of our task names to the unique names

get_inverse_task_name_mapping(path)

Gets mapping of the unique names to our task names

read_tasks_df(path)

Reads DataFrame with tasks

Classes#

class sampo.utilities.task_name.NameMapper#

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

__getitem__(key)#
get(key)#
__setitem__(key, value)#
class sampo.utilities.task_name.DummyNameMapper#

Bases: NameMapper

Helper class that provides a standard way to create an ABC using inheritance.

property _source#
__getitem__(item)#
get(item)#
class sampo.utilities.task_name.DictNameMapper(source: dict[str, str])#

Bases: NameMapper

Helper class that provides a standard way to create an ABC using inheritance.

get(item)#
__getitem__(item)#
class sampo.utilities.task_name.ModelNameMapper#

Bases: NameMapper

NameMapper for Kovalchuk’s model integration

get(item)#
__getitem__(item)#
abstract __nie()#

Functions#

sampo.utilities.task_name.get_task_name_unique_mapping(path: str) NameMapper#

Gets mapping of our task names to the unique names :param path: path to the csv file :return: dict {our_name: unique_name}

sampo.utilities.task_name.get_inverse_task_name_mapping(path: str) NameMapper#

Gets mapping of the unique names to our task names :param path: path to the csv file :return: dict {unique_name: our_name}

sampo.utilities.task_name.read_tasks_df(path: str) pandas.DataFrame#

Reads DataFrame with tasks :param path: path to the csv file :return: The DataFrame read