tasks
Task
A task offers a light-touch way for users to specify any arbitrary downstream task that they want to run on a dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the task. |
required |
run
|
Callable
|
The function to run. |
required |
supports_fairness
|
bool
|
Whether the task supports fairness evaluation. |
False
|
target
|
str
|
The target column name for fairness evaluation (required if supports_fairness=True). |
None
|
description
|
str
|
The description of the task. |
''
|
supports_aequitas
|
bool
|
Deprecated alias for supports_fairness (for backward compatibility). |
None
|
Source code in src/nhssynth/modules/evaluation/tasks.py
supports_aequitas
property
Deprecated: Use supports_fairness instead.
get_tasks(fn_dataset, tasks_root)
Searches for and imports all tasks in the tasks directory for a given dataset.
Uses importlib to extract the task from the file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fn_dataset
|
str
|
The name of the dataset. |
required |
tasks_root
|
str
|
The root directory for downstream tasks. |
required |
Returns:
| Type | Description |
|---|---|
list[Task]
|
A list of tasks. |