-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Switch from print to logging #282
Comments
hey @williamFalcon could you just guide me to the files that needs print to be changed to logging and i'll do it. Thanks. |
I think that we were talking about it already a few months back :] happy to see it pass O:-) @humandotlearning please use lazy formating
|
I suppose f-strings are preferred? |
Given a second thought, what about adding a However: after a quick search. their are certain functions which dont have access to LoggerBase at this moment. For example the callback |
Please use f-strings! |
okay as @williamFalcon suggested i'll go with f-string. I have done a performance comparison if anyone is interested. |
@humandotlearning @lr1d already started in #457 |
actually I'm stuck with how to let users select custom printing function? Any idea on this? |
@Ir1d what do you mean by custom printing function? |
it is nice library, but I would follow the same strategy as for PyTorch, do not include anything extra until it is really needed so I would sta just with the standard |
@williamFalcon @Ir1d just noticed that using f-string makes unable to use python 3.5 and lower... |
@Borda Yes, and I believe @williamFalcon is aware of this fact 😂 |
It's possible to use f2format to convert f-strings to str.format, to be compatible with Python <=3.5 |
@ethanjperez amazing haha. it’s finally happening :) i think it’s a good place to start for a PR @ethanjperez ? |
@ethanjperez it is true, but I am not sure that we do not want to have this # the original code
var = f'foo{(1+2)*3:>5}bar{"a", "b"!r}boo'
# after `f2format`
var = 'foo{:>5}bar{!r}boo'.format((1+2)*3, ("a", "b")) |
Use logging instead of print. (@Ir1d you brought this up before)
Suggested by @adefazio
The text was updated successfully, but these errors were encountered: