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

Improve preprocessing logging #1263

Merged
merged 4 commits into from
Jul 14, 2021
Merged

Improve preprocessing logging #1263

merged 4 commits into from
Jul 14, 2021

Conversation

brandenchan
Copy link
Contributor

Reduce duplicated message when preprocessing

@brandenchan brandenchan requested a review from tholor July 8, 2021 13:12
Copy link
Member

@tholor tholor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really appreciate the goal, but I am concerned about the approach as it would delay the logging messages to the end of processing. That could be confusing during debugging where you might want to understand what parts of the code got executed etc.
We probably want to have a similar design in other parts of FARM / Haystack - so it's probably worth making it neat.

My proposal would be to switch self.log to a Set, when we want to log a new msg we check if it's already in self.log. If yes: skip logging. If no: do logging and add msg to self.log
With that, we have the same effect and no time delay. What do you think?

@brandenchan
Copy link
Contributor Author

Yup I'm all for this idea!

I really appreciate the goal, but I am concerned about the approach as it would delay the logging messages to the end of processing. That could be confusing during debugging where you might want to understand what parts of the code got executed etc.
We probably want to have a similar design in other parts of FARM / Haystack - so it's probably worth making it neat.

My proposal would be to switch self.log to a Set, when we want to log a new msg we check if it's already in self.log. If yes: skip logging. If no: do logging and add msg to self.log
With that, we have the same effect and no time delay. What do you think?

Yup I'm all for this idea!

@brandenchan brandenchan requested a review from tholor July 14, 2021 11:05
Copy link
Member

@tholor tholor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brandenchan brandenchan merged commit 7717e81 into master Jul 14, 2021
@brandenchan brandenchan deleted the improve_preproc branch July 14, 2021 12:03
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

Successfully merging this pull request may close these issues.

None yet

2 participants