1.16.32
flytekit.core.class_based_resolver
Directory
Classes
| Class | Description |
|---|---|
ClassStorageTaskResolver |
Stores tasks inside a class variable. |
flytekit.core.class_based_resolver.ClassStorageTaskResolver
Stores tasks inside a class variable. The class must be inherited from at the point of usage because the task loading process basically relies on the same sequence of things happening.
Parameters
class ClassStorageTaskResolver(
*args,
**kwargs,
)| Parameter | Type | Description |
|---|---|---|
*args |
||
**kwargs |
Properties
| Property | Type | Description |
|---|---|---|
instantiated_in |
str |
|
lhs |
None |
|
location |
str |
Methods
| Method | Description |
|---|---|
add() |
|
find_lhs() |
|
get_all_tasks() |
Future proof method. |
load_task() |
Given the set of identifier keys, should return one Python Task or raise an error if not found. |
loader_args() |
This is responsible for turning an instance of a task into args that the load_task function can reconstitute. |
name() |
|
task_name() |
Overridable function that can optionally return a custom name for a given task. |
add()
def add(
t: flytekit.core.python_auto_container.PythonAutoContainerTask,
)| Parameter | Type | Description |
|---|---|---|
t |
flytekit.core.python_auto_container.PythonAutoContainerTask |
find_lhs()
def find_lhs()get_all_tasks()
def get_all_tasks()Future proof method. Just making it easy to access all tasks (Not required today as we auto register them)
load_task()
def load_task(
loader_args: typing.List[str],
) -> flytekit.core.python_auto_container.PythonAutoContainerTaskGiven the set of identifier keys, should return one Python Task or raise an error if not found
| Parameter | Type | Description |
|---|---|---|
loader_args |
typing.List[str] |
loader_args()
def loader_args(
settings: flytekit.configuration.SerializationSettings,
t: flytekit.core.python_auto_container.PythonAutoContainerTask,
) -> typing.List[str]This is responsible for turning an instance of a task into args that the load_task function can reconstitute.
| Parameter | Type | Description |
|---|---|---|
settings |
flytekit.configuration.SerializationSettings |
|
t |
flytekit.core.python_auto_container.PythonAutoContainerTask |
name()
def name()task_name()
def task_name(
t: flytekit.core.base_task.Task,
) -> typing.Optional[str]Overridable function that can optionally return a custom name for a given task
| Parameter | Type | Description |
|---|---|---|
t |
flytekit.core.base_task.Task |