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

Use logging instead of print in codebase #43

Open
chanind opened this issue Mar 23, 2024 · 3 comments
Open

Use logging instead of print in codebase #43

chanind opened this issue Mar 23, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@chanind
Copy link
Collaborator

chanind commented Mar 23, 2024

Currently, logging info is output using print(), but this makes it hard to control the verbosity level of the output, and cannot distinguish between debugging / info statements and warnings / errors. For instance, in sae_training/config.py, creating a config object prints a lot of statements, but these are a mix of debugging / info / warnings, and would be better suited to using the Python logging module.

@jbloomAus jbloomAus added enhancement New feature or request good first issue Good for newcomers labels Mar 25, 2024
@anthonyduong9
Copy link
Contributor

I can work on this this week.

@anthonyduong9
Copy link
Contributor

@chanind there are many tests and .ipynb files with print(). It's not clear to me if print() or logging is better there, and for tests, if we should have print() or logging at all. What do you think?

@chanind
Copy link
Collaborator Author

chanind commented Sep 26, 2024

I feel like print is fine for jupyter notebooks, and agree, unit tests shouldn't have print statements ideally - prints in unit tests should be deleted. Maybe benchmark tests are OK to have print statements since we don't really run those except manually and rarely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants