kedro-org / kedro

Kedro is a toolbox for production-ready data science. It uses software engineering best practices to help you create data engineering and data science pipelines that are reproducible, maintainable, and modular.
https://kedro.org
Apache License 2.0
9.47k stars 875 forks source link

Logs for packaged Kedro projects are confusing #3902

Open astrojuanlu opened 1 month ago

astrojuanlu commented 1 month ago

Description

When I run a packaged Kedro project, the logs get the project name from the directory, which is very weird:

$ cd /tmp
$ python -m test_package_kedro --conf-source ~/.../dist/conf-test_package_kedro.tar.gz
...
[05/30/24 14:16:49] INFO     Kedro project tmp                    session.py:324
[05/30/24 14:16:50] INFO     Using synchronous mode for  sequential_runner.py:64
                             loading and saving data. 
...

This is more confusing if I'm in a directory that has nothing to do with the project:

$ cd ~/Projects/seaborn
$ python -m test_package_kedro --conf-source ~/.../dist/conf-test_package_kedro.tar.gz
...
[05/30/24 14:14:36] INFO     Kedro project seaborn                session.py:324
...

Context

The reason I'm reporting this is actually two fold:

Steps to Reproduce

  1. Package any Kedro project of your liking, and install it in your environment
  2. Move to another directory and execute python -m <kedro_project_package_name> to run it (equivalent of kedro run for packaged projects)
  3. Observe the logs

Expected Result

Are these expectations reasonable? Is there something I'm missing?

Your Environment