-
Notifications
You must be signed in to change notification settings - Fork 27
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
BUG: to_mermaid #349
Comments
I know that it is probably not intended to just visualize one job but I might not be the only one that by accident passes a single job instead of a Flow. |
I am closing it as the documentation clearly says it should be a Flow. |
A quick fix would just be to check if it's a single Job, and if so, just wrap it with a Flow and continue just like that. |
This would work if a single job in a Flow would create an output. Maybe, there is a real bug then: from jobflow.utils.graph import to_mermaid
from jobflow import job, Flow
@job
def add(a, b):
return a + b
add_first = add(1, 2)
my_flow = Flow(jobs=[add_first])
graph_source = to_mermaid(my_flow)
print(graph_source) produces
|
If we remove the following line, it should work: jobflow/src/jobflow/utils/graph.py Line 246 in 09ffa16
I am just wondering if there is an intention beyond omitting to visualize just one job. |
Thanks for the discussion. Closed with #350 |
Adding a note that mermaid syntax supports |
Actually nevermind, I see this was already implemented(!) Very cool |
Describe the bug
I tried to run the following code.
It fails with:
The text was updated successfully, but these errors were encountered: