Fix #18: Replace print() with logging#64
Conversation
Closes nikopueringer#18 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
print is actually preferred to logging! Thanks for the submission, but I'm going to keep the current function. |
You can both still use |
|
gotcha. perhaps i misunderstood this. Which is likely. Could one of you help clarify the function of this to me? |
|
I originally made it as a fix for this issue: #18 |
you can use it the same way as a print statement but get more control over the printed output. say you have a status update or a progress bar, that could be a logging.info, and say you want detailed info from what every line in a function is doing, then you would use logging.debug it can of course also write logs, could be useful if you have a lot of functions that are very verbose and scrolling up in the terminal is a lost cause in his commit it's more of a future proofing thing to encourage the use of the logging module, he's only replaced print with logging.info in all the files. functionally it will be the same if you commit this |
There was a problem hiding this comment.
unnecessary formatting if you ask me
Code Review — Community ContributionHey @cmoyates, the intent here is solid — Files touched are in the No-Go ZonePer the project's CONTRIBUTING.md,
Now, these logging changes are technically safe — they don't touch model logic, weight loading, tensor handling, or any functional code. They're purely I/O (print → logger). So the spirit of the no-go rule (don't break model behaviour) isn't violated. But the letter of the rule says these files are off-limits. This is ultimately a maintainer call. The changes themselves are correct:
SuggestionIf the maintainer is open to it, this could merge as-is — the changes are safe and improve log hygiene. But the PR description should explicitly acknowledge the no-go zone exception and explain why it's safe (logging-only, no functional changes). That makes it easier for the maintainer to approve. The |
Summary
logger = logging.getLogger(__name__)toinference_engine.pyandmodel_transformer.pyprint()calls with appropriatelogger.info()/logger.warning()callsNote: Untested — checkpoint loading paths are mocked in unit tests. Verified lint/format pass.
Closes #18
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com