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

Message management for running with signac flow directives #555

Open
PheelyC opened this issue Jul 23, 2021 · 3 comments
Open

Message management for running with signac flow directives #555

PheelyC opened this issue Jul 23, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@PheelyC
Copy link

PheelyC commented Jul 23, 2021

Feature description

At the moment when running with operation directives or command line option, the Environment messages are printed each time and the progress bar is forced to start a new line as shown below.
signac_flow_message

I would like to have a silent option that controls the signac flow messages that are not part of the progress bar, such that the bar can be static.

@mikemhenry mikemhenry added the bug Something isn't working label Jul 23, 2021
@bdice
Copy link
Member

bdice commented Jul 23, 2021

@PheelyC Can you confirm if this happens with the "fork" directive disabled? We discussed enabling "fork" for your application on Slack, so I wonder if it's due to output from the forked process.

@PheelyC
Copy link
Author

PheelyC commented Jul 23, 2021

Upon further testing, I found that other directives than fork do not generate the issue, however, if I use the timeout option (run -t num) in the command line as I run, the issue comes up.

@bdice
Copy link
Member

bdice commented Jul 23, 2021

@PheelyC There are some options like timeout that require forking — the fork directive can force execution in a subprocess, but setting fork=False isn’t guaranteed to avoid forking if other options require it. That would explain why you’re seeing the messages in both of those cases. 👍

https://docs.signac.io/projects/flow/en/latest/api.html?highlight=Fork#flow.directives

Copying the current docs here for posterity (we are reworking this portion of the docs):

The fork directive can be set to True to enforce that a particular operation is always executed within a subprocess and not within the Python interpreter’s process even if there are no other reasons that would prevent that.
Note:
Setting fork=False will not prevent forking if there are other reasons for forking, such as a timeout.

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

3 participants