-
Notifications
You must be signed in to change notification settings - Fork 904
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
Get parallel runner to recognise framework-side logging config #1558
Comments
Interestingly, the behaviour is not the same in If I do |
The above problem should exist only for cases where the subprocesses are spawned rather than forked. I can confirm that you should see the following behaviour with no conf/base/logging.yml:
There does not seem to be a good way to get rid of |
See the results in PDF ParallelRunnerLogging.pdf Few things that I found inconsistent. 1st round of experiment - All without
|
Thanks very much @noklam for all this testing, it's very helpful!! 1st round of experiment - All without
|
P.S. do you know why all those geopandas warnings are being thrown for Python 3.8? |
Correct, they match the missing log that fail the e2etest, which suggest the logging.yml isn't applied on that few lines of log but we don't know the root cause yet. |
@AntonyMilneQB Sorry just saw your comments now. I test it on my Mac and I get these warnings in Python3.7, 3.9, 3.10 but not 3.8. The warning is due to distutils now being dropped and the latest geopandas (0.11.0) have been updated with this change. The warning would show up on geopandas<0.11.0, geopandas==0.11.0 only supports Python >= 3.8. It should install the latest version automatically when possible. geopandas_require = { P.S I get an error when trying to do
|
The parallel runner does not seem to use the framework-side logging config. By default, if you do a
kedro run --runner=ParallelRunner
then the project-side logging config is picked up correctly and you will see the logs correctly in the console and in the logs/info.log file. However, if you delete conf/base/logging.yml then most messages will no longer be logged:See this explanation for how logging config is setup for
kedro run
. However, with the parallel runner there's something else that happens too. Assuming that conf/base/logging.yml does exist:kedro/kedro/framework/session/session.py
Line 190 in 676600c
calls this function:
kedro/kedro/framework/project/__init__.py
Line 208 in 62cc27a
This sets the global
LOGGING
to be the project-side logging config.LOGGING
is used in https://github.com/kedro-org/kedro/blob/main/kedro/runner/parallel_runner.py to_bootstrap_subprocess
which means that all subprocesses have the project-side logging config.This seems to work (although it's not very nice to have the global variable). However, when there's no conf/base/logging.yml,
configure_logging
isn't called, soLOGGING
will be left asNone
, so_bootstrap_subprocess
won't set the logging configuration. This is fine because there's no project-side logging.yml to use BUT the problem is that the framework-side logging doesn't make it into the subprocesses, so no log messages get shown at all.What we need to do is:
LOGGING
should not beNone
but instead what comes out ofkedro.config.default_logger
LOGGING
so we can remove thatThe text was updated successfully, but these errors were encountered: