-
Notifications
You must be signed in to change notification settings - Fork 518
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
Print problem when importing this project #1021
Comments
Hi @UserAEH , can you try: stdout = sys.stdout
from super_gradients.training import models
sys.stdout = stdout
print("hello") |
It works perfectly, thanks. |
It's the first time someone faced this issue, I guess there must be a conflict between SuperGradients and something else in your environment. Did you import anything before the snippet you showed, or it happened when just importing |
No, there's nothing before the snippet. I posted the full code. |
Tried on 3.10.11 as well but it doesn't reproduce on my device. You can also try the following code, it might work as well: import sys
from super_gradients.training import models
sys.stdout = sys.__stdout__
print("hello") |
This solution is working. It seems like the problem is coming from the file common/abstractions/mute_processes.py. Print worked with the first code i posted and without reassigning original value to stdout.
|
Hi @Louis-Dupont , i tried to install from master. The encoding is added but the issue persisted. |
Problem confirmed for from super_gradients.training import Trainer is enough to cause the problem for me. Workaround sys.stdout = sys.stdout works, but it is still annoying. |
same problem here (Window 10)! |
I found the solution: |
The problem in your solution is that It prints also logger messages so I am not sure if it is a normal behavior. Logger should be written in log file not printed in the CLI. |
this issue still exists until now 2024.01.14 |
My problem is that no print is displayed in the command line when using this module:
A simple example could show this problem:
but no print appears on the console.
I tried with sys.stdout.write("hello") and sys.stdout.flush() but no results.
Is there any conflict with default print function? Do you have any idea about how to solve this issue?
The text was updated successfully, but these errors were encountered: