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

Some logging improvements #914

Open
36000 opened this issue Oct 18, 2022 · 5 comments
Open

Some logging improvements #914

36000 opened this issue Oct 18, 2022 · 5 comments

Comments

@36000
Copy link
Collaborator

36000 commented Oct 18, 2022

Some simple fixes:
Label tqdm bars;
print before doing SYN fitting that that is what you are doing
print before doing CSD fitting that that is what you are doing

Have an option for the CLI to print output to a file. In this case, make sure the TQDM bars do not take up a bunch of lines

@pierre-nedelec
Copy link
Collaborator

When using pyAFQ through the Python API (e.g. with ParticipantAFQ.export_all()), how do we get log to file?

@36000
Copy link
Collaborator Author

36000 commented Nov 28, 2022

You can redirect stdout and/or stderr to a log file. One of these solutions could work:
https://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python

@pierre-nedelec
Copy link
Collaborator

pierre-nedelec commented Sep 13, 2023

Should probably consider tqdm mininterval with various values for streaming vs logging. Currently log files can be MB because tqdm is printing a whole new line way too often (see picture below for example). A logger probably needs an updated every minute or so?
https://github.com/tqdm/tqdm#monitoring-thread-intervals-and-miniters
Include in #920?

image

@arokem
Copy link
Collaborator

arokem commented Sep 13, 2023

Yeah - this is really annoying. Here's another potential approach: https://stackoverflow.com/a/75059930

@arokem
Copy link
Collaborator

arokem commented Sep 13, 2023

And yes, could you please add one of these approaches to #920? That would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants