-
Notifications
You must be signed in to change notification settings - Fork 906
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
[KED-1258] Allow logging directory to be specified #161
Comments
The dependency on current working directory is a known problem that we've been working to resolve for sometime, we've stomped out all the smaller problems but logging config is quite awkward to deal with. The catalog also needs some work but that's at least manageable as we control the data format and it's processing, unlike with logs. |
@WaylonWalker If you are OK with logging to a directory defined within the working directory, you can hack that functionality in by overloading What I have done below is to allow the specification of the optional key
Incidentally, I also dump the parameters used during the run into the logging directory as a JSON file as well for future reference. |
Hi @WaylonWalker @khdlim we have just landed a commit on the I'm closing this issue as a result. Please let me know if you have any issue. |
Great Work!!!! Excited to see this in the next version. We have a quick hack implemented on our pipelines that simply saves the current directory, loads context, then changes back to where the user was. It might be good to update def run_package():
# entry point for running pip-install projects
# using `<project_package>` command
- project_context = load_context(Path.cwd())
+ project_context = load_context(Path(__file__).parents[1]) # it might be a different layer of parents double check that
project_context.run() |
Great shout. Will definite make that change. |
Description
It is very jarring for kedro to change directories on its users. It appears that this is done for logging purposes. Is there a way to specify the logging directory without changing the users directory? This is possibly related to #149.
https://github.com/quantumblacklabs/kedro/blob/c96e94dc46948b05d9d09e285894ba3ff03c2595/kedro/context/context.py#L518-L522
Context
It is very confusing to have a side effect of changing directories after running a function. This behavior is not typical with other python frameworks/libraries that I am familiar with.
Possible Implementation
set the logging directory and remove the
os.chdir
line.Possible Alternatives
My project templates track the user's directory and changes it back to where the user intended to be. This works, but is less desirable.
The text was updated successfully, but these errors were encountered: