Skip to content

Commit

Permalink
Async Agent Interface Refactor (flyteorg#2467)
Browse files Browse the repository at this point in the history
Signed-off-by: bugra.gedik <[email protected]>
  • Loading branch information
Future-Outlier authored and bugra.gedik committed Jul 3, 2024
1 parent e414861 commit 1facfd6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions flytekit/extend/backend/base_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ def metadata_type(self) -> ResourceMeta:
def create(
self,
task_template: TaskTemplate,
output_prefix: str,
inputs: Optional[LiteralMap],
output_prefix: Optional[str],
task_execution_metadata: Optional[TaskExecutionMetadata],
**kwargs,
) -> ResourceMeta:
Expand Down Expand Up @@ -297,7 +297,9 @@ def execute(self: PythonTask, **kwargs) -> LiteralMap:
task_template = get_serializable(OrderedDict(), ss, self).template
self._agent = AgentRegistry.get_agent(task_template.type, task_template.task_type_version)

resource_mata = asyncio.run(self._create(task_template, output_prefix, kwargs))
resource_mata = asyncio.run(
self._create(task_template=task_template, output_prefix=output_prefix, inputs=kwargs)
)
resource = asyncio.run(self._get(resource_meta=resource_mata))

if resource.phase != TaskExecution.SUCCEEDED:
Expand Down

0 comments on commit 1facfd6

Please sign in to comment.