<@ULVA73B9P> I have a parent flow in file parent.p...
# ask-marvin
a
@Marvin I have a parent flow in file parent.py, which calls a child flow in child.py. The child flow consists of multiple mapped tasks. When I run the child flow directly, or if I import child.py and invoke the child flow, everything works as expected. However, if I instead use flow.from_source and pull child.py from a Git repository, the flow only runs the first task and the final task, skipping everything in between. I am concerned that there's a problem with concurrency using this method. What might be going wrong?
m
It seems like there might be a few things going wrong here. Firstly, Prefect provides a
.map()
implementation that automatically creates a task run for each element of its input data. Mapped tasks represent the computations of many individual children tasks. If your child flow is not executing all the tasks, it might be due to the way the tasks are mapped. Secondly, there might be an issue with the way you're retrieving the flow from the remote storage. Flows can be retrieved from remote storage using the
flow.from_source
method. This method accepts a git repository URL and an entrypoint pointing to the flow to load from the repository. Make sure you're pointing to the correct flow in the repository. Lastly, there might be a concurrency issue. Prefect allows you to configure the concurrency capacity within a specific concurrency limit. If the tasks in your child flow are not running as expected, it might be due to the way the concurrency limit is set. I would recommend checking these three areas to troubleshoot the issue. If you're still having trouble, it might be helpful to post a question on the Prefect community forum or GitHub repository.