Closed WabbyWabbo closed 1 year ago
ai.djl.training.util.ProgressBar
is designed for console application. It doesn't work well with log file. You can redirect the console out put to a file, and you can the progress looks ugly in the file.
In real world, you don't need to pass Progress to Criteria
class, it's optional. You can also create your own implementation of Progress if customize for your own logging purpose.
ai.djl.training.util.ProgressBar
is designed for console application. It doesn't work well with log file. You can redirect the console out put to a file, and you can the progress looks ugly in the file.In real world, you don't need to pass Progress to
Criteria
class, it's optional. You can also create your own implementation of Progress if customize for your own logging purpose.
Thanks frank. That solved my problem.
My another question is that How can i get these output when my app is packaged into a fat-jar file?
My application runs well in InteliJ idea with some red text output in idea's Run Console , but when it's packaged to a jar file with maven shade plugin (not assembly plugin, i've into #1428 once ). When i run my packaged fat-jar, it just get stucked somewhere forever without any output, which makes it hard for me to debug. I think there must be something wrong in package phrase, but i cannot see the full debug output. I've been here for about a week without any effective progress. Do you have any idea? Thanks again.
Your console output comes from paddlepaddle native code. Not from java logger.
You need use a proper logging system (e.g. log4j2, logback etc.) to enable java logging.
For how to distribute your application, you can take a our demo: https://github.com/deepjavalibrary/djl-demo/tree/master/development/fatjar
Feel free to re-open the issue if you still have question.
Description
When i was loading model, i got
Loading: 100% |========================================|
in console. I found that is fromai.djl.training.util.ProgressBar
which hasSystem.out.println
. Can this be replaced by logger in the future? Thanks.