-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Flow gets stuck when sending logs to UI from some libraries #15762
Comments
Thanks for the bug report @williamjamir! Have you tried using the If that doesn't work we can dig in more. My hunch is that when creating a custom |
Hi @desertaxle , thanks for the prompt response! If you meant For reference, I used the following command: PREFECT_LOGGING_EXTRA_LOGGERS='pymc' python -m acme Regarding the custom logging configuration, the provided code is a minimal reproducible example. I’d appreciate any guidance on how to properly configure structlog while still incorporating parts of Prefect’s default logging behavior. Any specific instructions or examples would be incredibly helpful. As for the original issue, I’m happy to assist in any way necessary. |
Hi @desertaxle, Is there any way I can help with this investigation? Are there any leads or suggestions on where I should begin to assist in resolving this issue? At the moment, I have the logs disabled, which is unfortunate, as it would be ideal to fully utilize the UI dashboard. Thank you! |
I found the issue that was causing this error. Underneath, I believe then that this issue is related to some of these tickets:
Do you think we should close this issue? Or could something from the Prefect's side be added to warn about this issue or somehow avoid this deadlock? |
Hey @williamjamir, I'm one of the developers for |
Hi @ColtAllen The issue I was running into was caused by the On macOS, everything worked smoothly once I set the fit method parameter I'm not entirely sure why my Linux server setup was problematic earlier; perhaps "fork" is the default there, or there might be another reason. 🤷♂️ To be on the safe side, I also added the following at the start of my pipeline: with contextlib.suppress(RuntimeError):
multiprocessing.set_start_method('forkserver') Since some of our development happens on macOS, I also configured this environment variable:
Please don't hesitate to ping me if I can clarify anything further. On a different note, you have mentioned that it's exploring orchestration integrations, which sounds like an exciting development for the future of the library! Currently, I am in the process of productionizing a pipeline that uses pymc-marketing. If there’s a roadmap or any ideas for improvements on the PyMC side, I would be happy to assist in any way I can. Let me know if I can assist in any way! |
Thanks @williamjamir! I've created an issue for this in the Another one of our developers has ran into similar issues using
|
Speaking beyond |
Bug summary
I'm having trouble using Prefect with the pymc library. When I send logs to the UI, the flow gets stuck and doesn't finish, so I have to cancel it manually. This problem happens with both Prefect versions 2 and 3.
I've encountered similar issues with other situations, like with Dask and other integrations, but I couldn't figure out the problem. I think solving this issue will also help with other similar unnoticed problems.
Here's a minimal reproducible example. When it's working properly (without sending logs to the UI), it should run in 5 to 6 seconds.
logging.yaml
acme.py
Version info (
prefect version
output)Additional context
I already tried disabling the progress bar from Pymc, but the issue is still persisting (flow gets stuck)
Also, this is the stack trace when interrupting the execution on Prefect 3
The text was updated successfully, but these errors were encountered: