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

cf.task creating Prefect task but inputs not logged #405

Open
mattijsdp opened this issue Feb 2, 2025 · 1 comment
Open

cf.task creating Prefect task but inputs not logged #405

mattijsdp opened this issue Feb 2, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@mattijsdp
Copy link

mattijsdp commented Feb 2, 2025

Description

When creating a task with the task decorator and calling that task inside a flow, if Prefect is configured correctly then this will create a Prefect flow and task. The inputs to the task in question though are not logged correctly. On the task page under task inputs for the example below it simply gives:

{
  "topic": []
}

Whereas I would expect:

{
  "topic": "roses"
}

Example Code

# In the terminal run:
# `prefect server start`
# `prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api`
import controlflow as cf


@cf.task()
def write_poem(topic: str) -> str:
    """Write a poem about the topic"""

@cf.flow
def demo_flow():
    return write_poem(topic="roses")

if __name__ == "__main__":
    result = demo_flow()

Version Information

ControlFlow version: 0.12.0
Prefect version: 3.1.14
LangChain Core version: 0.3.31
Python version: 3.11.11
Platform: macOS-15.2-arm64-arm-64bit

Additional Context

No response

@mattijsdp mattijsdp added the bug Something isn't working label Feb 2, 2025
@mattijsdp
Copy link
Author

Turns out I just misunderstood the Prefect functionality side of things. Task inputs only show task keys, not values. I was expecting it to show values, similar to this feature request PrefectHQ/prefect#11301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant