Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeExecutionTask doesn't handle inputs correctly when in a Workflow #709

Open
shhlife opened this issue Mar 25, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@shhlife
Copy link
Collaborator

shhlife commented Mar 25, 2024

Is your feature request related to a problem? Please describe.
When using a pipeline, the CodeExecutionTask can access the parent task's output like this:

def my_fn(task: CodeExecutionTask) -> BaseArtifact:
  print(task.input)
  return TextArtifact(task.input)

However, Workflows don't work this way because there are potentially multiple parent tasks. You end up needing to do this instead:
task.parents[0].output.value.

Describe the solution you'd like
It would be better if we could use task.inputs[0] instead, that way it would be more consistent with pipelines.

@shhlife shhlife added the enhancement New feature or request label Mar 25, 2024
@collindutter
Copy link
Member

@shhlife does this only happen with CodeExecutionTask?

@shhlife
Copy link
Collaborator Author

shhlife commented Mar 25, 2024

I'm not sure.. for regular pipeline tasks we reference the task input value as parent_output, and for workflows it's parent_outputs.

But those haven't been defined as functions the way the CodeExecutionTask needs to be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants