You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In some examples, logs generated before calling LearnerBuilder::build don't get saved to the log file.
Some of the examples affected by this issue are: mnist, text_classification, text_generation. Examples of the discarded logs are of target burn_train::metric::cuda, cubecl_wgpu::runtime, hf_hub, all of which are generated at the pre-model-fitting stage.
The cause is that the built-in logger doesn't get installed until LearnerBuilder::build is called, and no other logger is set before that, so those logs are ignored by the log macros.
To Reproduce
A couple of extra lines will appear at the head of the log file if we set a logger manually as follows instead of relying on LearnerBuilder to do it:
Create an instance of FileApplicationLoggerInstaller (from burn-train) and install it at the begin of the program;
Call .with_application_logger(None) before building the learner.
Expected behavior
All the logs written via the log crate should be saved into log files.
Maybe LearnerBuilder::tracing_logger should default to None so that users can be freed from making the .with_application_logger(None) call every time they want to use Learner without losing any logs.
====
UPDATE: Added the cause.
The text was updated successfully, but these errors were encountered:
Describe the bug
In some examples, logs generated before calling
LearnerBuilder::build
don't get saved to the log file.Some of the examples affected by this issue are: mnist, text_classification, text_generation. Examples of the discarded logs are of target
burn_train::metric::cuda
,cubecl_wgpu::runtime
,hf_hub
, all of which are generated at the pre-model-fitting stage.The cause is that the built-in logger doesn't get installed until
LearnerBuilder::build
is called, and no other logger is set before that, so those logs are ignored by the log macros.To Reproduce
A couple of extra lines will appear at the head of the log file if we set a logger manually as follows instead of relying on
LearnerBuilder
to do it:FileApplicationLoggerInstaller
(from burn-train) and install it at the begin of the program;.with_application_logger(None)
before building the learner.Expected behavior
All the logs written via the
log
crate should be saved into log files.Maybe
LearnerBuilder::tracing_logger
should default toNone
so that users can be freed from making the.with_application_logger(None)
call every time they want to useLearner
without losing any logs.====
UPDATE: Added the cause.
The text was updated successfully, but these errors were encountered: